Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.3.31f1
2022.3.11f1
2023.1.17f1
2023.2.0b14
2023.3.0a10
Issue ID
UUM-54179
Regression
No
Gravity stops working when there are 2 or more Animation Layers in the Animator and the "Apply Root Motion" option is enabled
Reproduction steps:
1. Open the attached “IN-55995 Gravity Weight Bug with Multiple Anim Layers.zip“ project
2. Open the “SampleScene”
3. Enter Play mode
Expected result: The “Square” GameObject falls downwards quickly
Actual result: The “Square” GameObject is not moving
Reproducible with: 2021.3.31f1, 2022.3.11f1, 2023.1.17f1, 2023.2.0b14, 2023.3.0a10
Reproduced on: Windows 11 Pro (22H2)
Not reproduced on: No other environment tested
Notes:
- Reproducible in the Player
- Reproducible in a new project
- Reproducible with both “Rigidbody” and “Rigidbody 2D” components (one of these is required to be present on the GameObject for gravity to work)
- The issue is most likely caused by the Animator.gravityWeight variable being set to 0 in the Unity Editor’s source code when more than 1 Animation Layer is present in the Animator (look for the link to the discussion with developers in the internal comments for more information)
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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
Resolution Note:
We have confirmed the issue. This issue only happens under the flowing conditions:
* The override layer contains only constant curves on the root bone
AND
* the constant curves have exactly the same value as all the other constant curves in the AnimatorController
Workaround: Add any non constant curve on the root position or rotation anywhere in the AnimatorController. This will force the evaluation to go through the proper root motion path and output the expected result.
Unfortunately, after careful consideration, we will not be addressing your issue because of the high risk associated with changing this behaviour and the workaround mentioned above.