CharacterController has Gravity without applying any

Yeah so i have this weird thing where my character controller already has gravity applied by default. But from the Documentation i read that it shouldnt work like that. I also have a Rigidbody for the Targeter but its kinematic and i checked “Use Gravity” off.

Using Unity 2021.3.3f1

Hey @Pommez. What do you mean “has gravity applied by default”?

In this lecture, we are adding a downward velocity to our player if he is not grounded. It is explained around min 3:00. That check runs every frame. Basically, we are making sure our player stays on the ground if we move on uneven terrain by applying a force down to the character controller until its collider touches the ground.

Yeah i did some digging and found a stack overflow post and apperantly if you bake your y position in the animation it uses gravity by default. No idea why.

If I remember correctly in the early lectures we actually delete some Keyframes from Mixamo animations because they had some positions “Baked in”. Those keyframes would “drive” the bones which would in terms “move” the mesh on the Axis position(x/y/z). You can test the effects of Bake In from the inspector.

Here is an example of how a “Jump” looks with/without Baked Y . You can see the character is higher or it "has gravity " as you described it


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms