I have a wander behavior that I created off of some code elsewhere in these forums. I select a random location on the nav mesh, call the move behavior, and then wait for a random amount of time - rinse and repeat. My problem is that I cannot get my object’s rotation animation to play properly before moving.
I built an animation controller that uses speed and rotation speed in a blend tree. I have set speed to 1 and rotation speed to 90 through the AI inspector.
I have 6 animation clips in the blend tree:
walk turn left (rotation speed -90, speed 1), walk (rotation speed 0, speed 1), walk turn right (rotation speed 90, speed 1)
turn left (rotation speed -90, speed 0), idle (rotation speed 0, speed 0), turn right (rotation speed 90, speed 0)
walk turn left, walk, and walk turn right all have root motion. walk turn left, turn left, walk turn right, turn right have root rotation.
In my AI object, use root motion is checked and override root rotation is not checked.
The Face Before Move Angle is set to 0.01, which I think means that my object should be within 0.01 degrees of the target orientation before any speed is applied.
I would expect, then, that my turn left/right animations should play, as rotation speed is +/-90 and speed is 0. My object starts to rotate, but then freezes after either completing the animation once, or not at all. I’m guessing that since the root rotation did not get the object to the target orientation, speed is never set to 1, and nothing further happens.
So how am I supposed to configure my behavior to properly synch my rotations and movement behavior?