Hello, I'm currently trying to get a character walking nicely on a heightmap.
The main problem I have is how to handle walking down slopes nicely. Currently (well, until I broke things
) I had pretty decent results from snapping him to the ground on every frame, except when he jumps, when he gets an upward velocity and then resnaps onto the terrain once he lands.
HOWEVER, what I would like is for the player to be able to run off cliffs, and run down steep slopes with that kind of skipping motion that occurs when gravity isn't quite enough to pull him down to stay in contact with the slope. This is basically what you have in FPSs and stuff like Morrowind.
What happens when I have tried this is that I get horribly juddering stepped movement down slopes. So I was wondering - is there a standard approach to getting this movement on a slope working nicely? Any tutorials or pseudocode kicking around?
Cheers!
For context, the game looks pretty much like this:
(I'll probably start a devlog sometime, in case anyone's curious about the rest of it)