Search Issue Tracker

Won't Fix

Votes

0

Found in

5.0.0b5

Issue ID

635836

Regression

No

Velocity is unmeasurable whilst using StateMachineBehaviours

Animation

-

To reproduce this issue:

1. Open the scene called Test Scene.
2. The soldier gameobject has an animator controller with a state that makes him run
3. The state has a state machine behaviour on it which applies root motion.
4. Play the scene and note that the soldier's velocity is being logged in the console
5. It displays 0, 0, 0 despite the soldier running.
6. Stop the scene
7. Disable the BaseSMB script on the New State in the animator controller 'Controller'
8. Play the scene again
9. Note the correct velocity is shown
10. Stop the scene again
11. Re-enable the BaseSMB
12. Open BaseSMB for editing and comment out the entire OnStateMove function 13. so that the class is empty of code
14. Save the script, return to the editor
15. Play the scene
16. Note the soldier doesn't move anymore due to having an SMB

Suggestion: only if an OnStateMove function is detected in the SMB should it override the root motion. Otherwise it should be as indicated on the Animator component.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.