Something to watch for - player capsule lifting you above the ground

This is for others that may get stuck on this. During this lecture we use the Force object to keep us on the ground.

However when I implemented the code, I was still floating.

The reason was my player capsule on my player controller object was slightly under my feet, which was causing me to elevate my character above the ground. To fix I shrunk the capsule to just above the character’s ankles, and that resolved my issue, but this is a sticking point that some students may get stuck on thinking the code is wrong (when in this case its not the code at all!)

Usually that is a very good place for your collider, I do the same to avoid any mishaps.

1 Like

I had the same thing, and solved it by setting the following values on the Character Controller of the Player (got this from the GitHub repo):

Skin Width: 0.025
Center: X: 0 Y: 0.875 Z: 0
Radius: 0.25
Height: 1.75

1 Like

Privacy & Terms