Search Issue Tracker
By Design
By Design in 2023.2.X
Votes
1
Found in
2020.3.45f1
2021.3.19f1
2022.2.7f1
2023.1.0b5
2023.2.0a3
Issue ID
UUM-27271
Regression
No
Wrong rotations are set when using “SetLocalRotation“ in animation
How to reproduce:
1. Open the user’s attached “Animation Job Sets Wrong Rotation.zip” project
2. Enter Play Mode
3. In the Hierarchy window select “LeftArm” GameObject and observe its rotation
Expected result: Rotation is (10, 20, 30)
Actual result: Rotation is (10.612, 20.361, 30.065)
Reproducible with: 2020.3.45f1, 2021.3.19f1, 2022.2.7f1, 2023.1.0b5, 2023.2.0a3
Reproduced on:
macOS 12.4 (Intel)
Windows 10 (user’s info)
Notes:
Also reproducible with other bones too. Select “DefaultHumanoid” GameObject and observe other bones' rotation.
Reproduced in the Editor and in the Standalone Player.
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note:
The results of this scene are to be expected. The imprecisions are also expected when using the Humanoid solve, as the Humanoid works in Muscle space values and conversion is required. Humanoid is not a lossless process and should only be used if retargeting is required. In order to avoid the these problematics completely, we recommend using the Generic Animation Type instead. The Generic type will give you the exact result you where expecting in this scene.
If you require Humanoid for retargeting purposes, here's an explanation of the results you are seeing. First, what you are basically doing is, playing a Humanoid Muscle clip, locking Euler values on some bones, and applying IK on the feet (default Humanoid behaviour). When using a Humanoid solve, Euler curves go through a conversion to Quaternions in Muscle space. When these values are converted back into transform values, they have the same visual orientation, but values may change and we cannot guarantee these values will be the same. Other Humanoid solve rules such as limits may also change these values. In this case, you are also applying IK to the feet (default Humanoid behaviour) after the clip and the set rotation, explaining why the foot still follows the IK goal and moves the leg (with the static value now moving to the IK). If you want to set the bone rotation in the Humanoid context, we recommend setting the Muscle values in Humanoid directly. This will avoid extra conversion and imprecision . You should still not expect exact values as the Humanoid solve will do a final conversion to transforms and this will not be lossless.
Resolution Note (2023.2.X):
The results of this scene are to be expected. The imprecisions are also expected when using the Humanoid solve, as the Humanoid works in Muscle space values and conversion is required. Humanoid is not a lossless process and should only be used if retargeting is required. In order to avoid the these problematics completely, we recommend using the Generic Animation Type instead. The Generic type will give you the exact result you where expecting in this scene.
If you require Humanoid for retargeting purposes, here's an explanation of the results you are seeing. First, what you are basically doing is, playing a Humanoid Muscle clip, locking Euler values on some bones, and applying IK on the feet (default Humanoid behaviour). When using a Humanoid solve, Euler curves go through a conversion to Quaternions in Muscle space. When these values are converted back into transform values, they have the same visual orientation, but values may change and we cannot guarantee these values will be the same. Other Humanoid solve rules such as limits may also change these values. In this case, you are also applying IK to the feet (default Humanoid behaviour) after the clip and the set rotation, explaining why the foot still follows the IK goal and moves the leg (with the static value now moving to the IK). If you want to set the bone rotation in the Humanoid context, we recommend setting the Muscle values in Humanoid directly. This will avoid extra conversion and imprecision . You should still not expect exact values as the Humanoid solve will do a final conversion to transforms and this will not be lossless.