Up to this point. we haven't talked about how the Unity engine works, or how it manages to create lifelike interactions and movement in a virtual space. We'll spend the rest of this chapter learning the basics of Unity's physics system:
The two main components that power Unity's NVIDIA PhysX engine are as follows:
- Rigidbody components, which allow GameObjects to be affected by gravity and add properties such as Mass and Drag. Rigidbody components can also be affected by an applied force, generating a more realistic movement:
- Collider components, which determine how and when GameObjects enter and exit each other's physical space or simply collide and bounce away. While there should only be one Rigidbody component attached to a given GameObject, there can be several Collider components. This is commonly referred to as a compound Collider setup:
When two GameObjects collide with each other, the Rigidbody ...