What is a Rigidbody in Unity?

If you are using a GameObject that needs to interact with Unity’s physics engine, then you need a Rigidbody component added to it. A Rigidbody component allows you to control a GameObject‘s position and movement and mass through realistic physics calculations already built in Unity. There are many properties and functions associated with Rigidbodys, and…

What is a GameObject in Unity?

GameObjects are central to the development of most apps made in Unity. So what is a GameObject? GameObjects are the main objects in Unity. They are containers that can represent characters, lighting, cameras, scenery, and more. You can add Components to GameObjects to increase their functionality. Because GameObjects are such an important topic in Unity,…

How to Destroy a GameObject on Collision in Unity.

There are many reasons why you would want to destroy a gameobject in your app. Depending on the situation, you can use a specific function to make this happen, such as OnCollisionEnter(). To destroy a gameobject on collision, use the OnCollisionEnter() function for the collision itself and the Destroy() function to destroy a gameobject when…