Introduction to Physics in Unity
Objective: A basic look at applying Physics to your game objects.
Unity provides a built-in physics system. It is utilized by using the component Rigidbody. The component is available for 3D and 2D objects. Note: make sure to select the correct component for your environment as 3D components won’t interact with 2D components and vice versa.
Objects that have the Rigidbody added will react to real-time physics such as gravity and also react to collisions with other objects. you will want to put some thought into which objects you need the Rigidbody attached to as adding the Rigidbody to all game objects would hurt the performance of your game.
Adding the Rigidbody is very easy, in the inspector select the object you want and select add component, search for Rigidbody and select.
Below is examples of two objects colliding, one is with the Rigidbody added and the other is with no Rigidbody.
Next time we will talk about collision triggers.