Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.3.31f1
2022.3.10f1
2023.1.15f1
2023.2.0b12
2023.3.0a7
Issue ID
UUM-52192
Regression
No
When enabling Root Transform Position (Y) on an imported animation, gravity is applied when the GameObject also has only a Character Controller enabled
Steps to reproduce:
1. Unzip the attached user's project "AnimationGravityTest.zip"
2. Open "SampleScene.unity"
3. Enter Play Mode
4. Observe gravity in effect
5. View game object "Character"
6. Observe no Rigidbody, only "Animator" and "Character Controller"
7. Disable "Character Controller" and observe gravity stops
8. Inspect "Assets/Art/NPC/Characters/Character/Character@Idle.fbx"
9. Disable "Bake Into Pose" on Root Transform Position (Y) under the Animation category
10. Enter Play Mode and Observe gravity no longer in effect
Expected results: When enabling Root Transform Position (Y) on an imported animation, gravity is not applied when the object also has a character controller enabled
Actual results: When enabling Root Transform Position (Y) on an imported animation, gravity is applied when the object also has a character controller enabled
Reproducible with: 2021.3.31f1, 2022.3.10f1, 2023.1.15f1, 2023.2.0b12, 2023.3.0a7
Reproducible on: Windows 11, Windows 10
Not reproducible on: No other environment tested
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
- UI Builder can't set a background image to a sprite from a multi-sprite spritesheet in the Resources folder
- Light2D freeform does not render the internal part when rendered in certain shapes
- Using AddCopyPass causes an incorrect merging of passes.
- Negative Enum value is not pasted correctly when copying from another array
- Silent Crash when generating Lightmap UVs for a model with a large object scale
Resolution Note:
After checking with the Animation team, it seems that this is expected behavior. According these docs (https://docs.unity3d.com/Manual/RootMotion.html), the setting's Bake Into Pose flag also sets the Animator's gravityWeight to 1. This behavior and gravityWeight are also not documented very well, and I will open a separate ticket to address both doc areas. However, I will be closing this ticket as "Wont fix".
As for a work around for if you want to keep this setting on, instead of using a CharacterController, you could try using a Animation State Machine Behavior (https://docs.unity3d.com/Manual/StateMachineBehaviours.html). They are scripts attached to animation states in the Animator itself and allow you to move a character in similar to how a CharacterController could do.