Search Issue Tracker
By Design
Votes
1
Found in
2017.4.0f1
2017.4.28f1
2018.3.0a1
2019.1.0a1
2019.2.0a1
2019.3.0a1
Issue ID
1172293
Regression
No
HumanPose.bodyPosition accumulates error when Humanoid model is moving by using Root Motion animation
How to reproduce:
1. Open the attached project("TestHumanPosition")
2. Enter Play Mode
Expected result: the red sphere keeps up with the Humanoid model
Actual result: the red sphere lags behind the Humanoid model
Reproducible with: 2017.4.31f1, 2018.4.5f1, 2019.1.13f1, 2019.2.0f1, 2019.3.0a11
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Resolution Note:
The HumanPose is actually working as intended :
When calling HumanPoseHandler.GetHumanPose(ref humanPose), humanPose.bodyPosition is the global position of the center of mass of the character divided by the avatar human scale (it's a "normalized" position, so to speak).
To have perfectly matching positions in the provided project, all is needed is to mulitply the bodyPosition by the avatar human scale. i.e. replace
debugSphereHumanPose.position = pose.bodyPosition;
by
debugSphereHumanPose.position = pose.bodyPosition * animator.humanScale;
Unfortunately, the computation of bodyPosition is currently poorly documented in the API documentation, I have currently a local change that will improve this documentation.