Moving with Physics
So far, the Player, the only Object that moves with the Dynamic Collider Profile and the one that will move with Physics, is moving through custom scripting using the Transform API. However, every dynamic Object should move using the Rigidbody API functions in such a way that the Physics system understands this, so here, we will explore how to move Objects, this time through the Rigidbody
component.
In this section, we will examine the following Physics movement concepts:
- Applying forces
- Tweaking Physics
We will start by learning how to move Objects the correct physical way; that is, by using force. We will apply this concept to the movement of our player. Then, we will explore why real physics is not always fun, and how we can tweak the Physics properties of our Objects so that they have a more responsive and appealing behavior.
Applying forces
The Physically accurate way of moving an Object is through forces, which affect the Object...