What is a RigidBody in Unity?

By GameDevTraum

Introduction In this article we are going to see the RigidBody component in Unity, what it is for and how to use it. Knowing about this component will allow you to create precise physics in your game. What is a RigidBody in Unity? First RigidBody in Unity is a “Programming Class” defined at the core…

FixedUpdate Method in Unity

By GameDevTraum

Introduction In this article we are going to analyze Unity’s FixedUpdate method which allows us to make changes over time in our projects. A method is a function defined in a script that can be executed and performs the task we define inside it. To learn more about methods in programming you can read this article or watch…

Update Method – Unity

By GameDevTraum

Introduction In this article we are going to analyze Unity’s Update method which allows us to make changes over time in our projects. A method is a function defined in a script that can be executed and performs the task we define inside it. To learn more about methods in programming you can read this…

What is a GameObject? – Unity

By GameDevTraum

Introduction GameObjects are entities that we can place in Unity scenes, each GameObject will occupy a place in the hierarchy. In the field of programming, GameObject is a Programming Class. Basic features of a GameObject Let’s see what are the basic features and components of an Empty GameObject which is the most general that we…

#10 Change Scenes at runtime in Unity. LoadScene Method

By GameDevTraum

Introduction This is the last exercise in Unity’s Fundamental Series, in this article we’re going to see how to change the scene in Unity at runtime. Understanding how to change the scene is important because it allows us to separate the content of our game into parts, for example the main menu on one side…

#9 Rotate objects in Unity. Rotate method of the Transform class.

By GameDevTraum

Introduction In this article we’re going to see how to rotate objects in Unity. There are several ways to achieve this, in this case we will use the Rotate method of the Transform class, this will directly modify the rotation parameters that are observed at the top of the inspector with the GameObject selected. Go…

#8 Invoke Methods in Unity

By GameDevTraum

Introduction In this article we are going to see how to use the Invoke method of Unity’s MonoBehaviour class to execute an action with a certain delay. This allows us for example to create mechanisms that work for a while. Go to the project’s main page Before we start I invite you to watch the…

#7 AddForce Method in Unity. RigidBody Class

By GameDevTraum

Introduction In this article we are going to study how to use the AddForce method of Unity’s RigidBody class, which allows us to apply forces to GameObjects that have a RigidBody component assigned to them. The goal is to make the ball in the GameDevLab bounce indefinitely for the duration of the game. Go to…

#5 OnTriggerStay Method. Detecting Objects inside a region.

By GameDevTraum

Introduction In this article we are going to study how to use the OnTriggerStay method to detect the character in a certain region and apply actions when that happens. Specifically, we’re going to make the damage and health regeneration stations affect the character. Go to the project’s main page Before I start I invite you…

#4 Create and Destroy GameObjects in Unity at Runtime

By GameDevTraum

Introduction In this article we’re going to look at how to create and destroy GameObjects at runtime. Achieving this is very important for creating games, because it allows us to place objects when and where we want and then destroy them. Go to the project’s main page Before we begin, I invite you to watch…

#3 LookAt Method

By GameDevTraum

Introduction In this article we’re going to analyze how to apply the LookAt method in Unity, to make one GameObject look in the direction of another. Go to the project’s main page Before we begin, I invite you to watch the following video that resolves this problem, make sure to activate english subtitles. Procedure We…

#2 Find GameObjects from the Hierarchy in a Script

By GameDevTraum

Introduction In this article we are going to study different ways to find, from a Script, the GameObjects that are in the hierarchy in Unity. Among the forms we have to assign directly the objects from the inspector or find them through methods like “FindGameObject”. Go to the project’s main page Before we begin, I…

#1 Read Input in Unity. Input Class

By GameDevTraum

Introduction In this article we are going to see several methods from the Input class that will alloud us to read keyboard and mouse inputs in Unity. Go to the Project’s main page Before we begin, I invite you to watch the following video that resolves this problem, make sure to activate the english subtitles.…