Avoiding shaking with gravity

Blitz3D Forums/Blitz3D Programming/Avoiding shaking with gravity

xmlspy(Posted 2006) [#1]
I have a rountine that goes as follows:

If entitycolliding(player, ground) = 0 then
player_gforce# = player_gforce# - game_gforce#
moveentity player, 0, player_gforce#, 0
else
player_gforce# = 0
endif

I notice that if I don't apply enough force then the character will go smooth, but it will float when going downhill, and gradually touches the ground. If I put too much the mesh starts shaking up and down.

I have a mesh with a pivot, and I apply the radius, type, and the movement to this pivot.

Suggestions?


sonokong(Posted 2006) [#2]
Hmmm...Interesting problem. I'll post back to you on that.


xmlspy(Posted 2006) [#3]
by the way, I am using a mesh terrain. It doesn't have a clean straight surface.


xmlspy(Posted 2006) [#4]
Fixed it. The solution is to update the camera before you update the player.