Hey guys. So I have been bashing my brain in for about a week now. Basically my situation is, I am trying to implement a terrain following character, similar to WoW. If you haven’t played it before, these are it’s charactersistics -
-
While grounded, the user always stays grounded. Meaning, if the user walks down a somewhat steep slope, the player will stick to the ground no matter what.
-
If the ground beneath them is too steep, they go into “slide” mode and slide down it.
-
You can jump any time you are grounded, but not while sliding.
Seems simple right? Well, I have been trying to hack apart the FPS Character controller because it doesn’t quite behave as expected. If I am on a somewhat steep incline and walk up it, no problem it works great. The problem is with declines, if I walk down the same incline, the controller “bounces” down, since the forward velocity is greater then the gravity pulling them down.
I have all the different aspects working, but I can never get all of them to work at once. I have tried:
-
Raycasting from the player to the ground, finding the hit point and placing the player on the ground. Works great except if the player walks down a somewhat steep stair then they instantly snap to the ground instead of walking smoothly down it.
-
Modifying the angle of movement. So instead of pushing the player forward, I tried to angle the forward vector with the terrain normal using cross products. Works somewhat ok, but there are certain rotations where cross product doesn’t seem to get the correct forward vector, it is slightly skewed.
Have any of you experienced this issue of a bouncy character controller while walking down slopes? How were you able to reconcile it? Im looking for ideas to push me in the right direction, so any tips / techniques are welcomed. Also if anyone knows of any online articles that deal with this matter, I would be very interested in reading them. I searched gamedev.net but came up with nothing other then basic collision detection.
Thanks again for your time! Cheers!