Demonstrations


Unity, Collisison, Rigidbody, Gravity
Unity is a powerful tool to develop a simple game to powerful game that supports all OS and UI. When two or more body collides at a point is a collision. The body that cannot passed through, acts as real-world object, and shows the two or more-body striking each other and displaying certain physics properties is collision. Any body that can collide and still maintain their structure and follow the physics control is Rigidbody. Gravity is same as real world gravity that pulls object downwards.
​
Here, the resources are created as per the book, and a script is written and attached to the Sphere. Sphere has gravity option enabled so while playing the sphere falls. There are three cubes next to each other. When sphere falls it collides with these three cubes and then it rotates and move in different direction as per the physics. Video of a game play, and two screen shots are provided as a part of the demonstration.
Bibiliography
Tutorialspoint.com. 2021. Unity - Understanding Collisions - Tutorialspoint. [online] Available at: <https://www.tutorialspoint.com/unity/unity_understanding_collisions.htm#:~:text=Collisions%20in%20Unity%20are%20separated%20from%20the%20actual,realize%20that%20there%20could%20be%20thousands%20of> [Accessed 19 February 2021].
​
This reference is referenced here because it has explained collision in very layman terms possible with an example of wall and a player object a square which can be any shape. Box Collider 2D component is attached and the collision is observed.
​
Technologies, U., 2021. Unity - Manual: Rigidbody. [online] Docs.unity3d.com. Available at: <https://docs.unity3d.com/Manual/class-Rigidbody.html#:~:text=Rigidbodies%20enable%20your%20GameObjects%20The%20fundamental%20object%20in,is%20defined%20by%20the%20Components%20attached%20to%20it.> [Accessed 19 February 2021].
​
This reference is selected as it the documentation from the Unity itself and has provided what rigidbody can do and why is it necessary and how physics can be implemented on an object. Properties of the rigidbody is also provided.
​
Technologies, U., 2021. Unity - Scripting API: Physics.gravity. [online] Docs.unity3d.com. Available at: <https://docs.unity3d.com/ScriptReference/Physics-gravity.html> [Accessed 19 February 2021].
​
This reference tells that the gravity is under Physics category and can be turned off for the object if required. It also provide the basic gravity usage code along with Vector3.