Character is floating even with setGravity

I’ve been struggling with this a great deal. I have a few observations:

  1. The Y value of your walkDirection can be significant if you’re using the camera angle to move
  2. Mass doesn’t seem to have a significant effect on the fall speed of “large” characters
  3. Height seems to be optimum around 1.0 Smaller seems to fall through a mesh terrain, and larger seems to fall more slowly than I would expect

My thought is that maybe the bullet engine has some sort of an absolute terminal velocity concept, and that no matter the shape, things can only reach a certain velocity? (this is only a guess, I haven’t dived down into the code)

Also, I’m guessing that the ramp effect is due to colliding with the ground. If we’re setting our characters to move strictly in the XZ plane and the ground is at an angle, then the bullet engine might be calculating our motion based on the idea that we’re bouncing off the ground…

Some things that I’ve done to mitigate this are to:

  • modify the checkOnGround function to cast a bigger ray
  • Keep track of when I’m jumping, and when I land from a jump
  • Add a negative Y component to my walkDirection when I go airborne but didn’t jump

My very newbie hackings are visible here if anyone wants to have a look: GitHub - EndlessWilderness/endlesswilderness: The beginnings of an overly ambitious MMORPG