In this recipe, we will create a very common gameplay mechanism: a moving platform. We will use a Rigid body for our character and an animated, kinematic Rigid body for the platform.
Animating an object's world position - creating a moving platform
Getting ready
Before we start, you should have a scene with your character and a platform you want to animate. You can use the example project; go to the Chapter 02 Working with the animation view\Recipe 03 Animating objects world position - creating a moving platform directory. There is a scene called Example.unity there. If you open it, you will find a Sheep character in the Hierarchy. This is our character, using the Rigidbody component and...