‘Introduction To Physics In Unity’
#Unity #LearnToCode #CSharp #SoftwareDevelopment #PhysicsInUnity #GameDev #
Applying physics to a game object is simple. For example a developer creates a game where they want game objects affected by the gravity or velocity.
Inside the Unity Hub I created a cube and pressed play. As you can tell the cube is in the air this indicates the physics are not applied to the cube. To apply physics on the cube a Rigidbody needs to be added to the game object. Adding a Rigidbody to the cube is simple by selecting add component under the Inspector tab.
After adding the Rigidbody to the cube and I press play the cube descends. The cube is now descending because the physics have been applied and the gravity is pulling down the cube.