![]() |
Creature Control for Unity v0.1
|
The Insect component has a built-in walking animation mechanism. This can be used by assigning the InsectAnimator found in Runtime/Animation/InsectAnimator.controller to the Animator Controller field of the Insect component.
Additionally, you may want to tune the Step Size parameter to make the step length of the creature you are working with. A 10mm ant will take much smaller steps than a 30cm walking stick bug.
With this set up, the animation is controlled automatically by moving the Rigidbody or Transform around in the scene.
The animations are relative to the pose of the creature in the Editor. So if you pose the feet far apart, the creature will walk with a wide pose, while it walks with a narrow pose when they are posed close to each other.
More information is found in the Posing documentaion.
The various creature controllers (for instance, the Insect Controller) use Unity's Input Actions to control the creature moving around and can be used as a starting point for more complex interaction controls
The animation work without a Rigidbody or with a kinematic or dynamic Rigidbodies. For the latter two options, you may want to attach a body collider to the creature. An easy way to do this is to use the Add Body Collider button in the Inspector of the Insect script.