Character Floating

My character is floating just off the surface of the ground (a plane) when the game is started. I have attempted to fine-tune the CharacterController component’s capsule collider height, center and skin width, but none of those settings actually change anything. I also added a rigidbody component to see if it was an issue with no gravity being applied to the game object, and this also did not help. In fact, even when I change the height of the CharacterController capsule collider to 0, I get the same effect. There are no other colliders on the character.


Hard to say for sure, but I’d check your character model’s position. Make sure it’s not offset

In a perfect world, our Capsule Collider would always have the exact same height as the character, and it’s center would always be exactly 1/2 the value of the capsule height. In practice, however, these things are never perfect, because the animation process distorts the actual height of the character. In short, it’s never going to be perfect for all points in all animations, or even often in any points of any animation.

I’m not sure why the Rigidbody gravity didn’t have the same effect, but when I got to the section on adding the ForceReceiver class to the player, this got resolved.

Silly me, I should have investigated this further. I was assuming that right away you were floating off the ground… The CharacterController moves exactly where you tell it to move with the Move statement. While it uses the rigidbody to allow the physics engine to keep it from walking through an obstacle, if you move off of a cliff (or slight bump in the terrain), the character won’t fall on it’s own. My answer from the beginning should have been “Wait until we implement the ForceReceiver”.

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

Privacy & Terms