I recently moved from Bullet to PhysX to see if it would be a better solution for my game engine, and so far it is. The only problem that I'm having, which is part of the reason that I switched is with the character controller. The build in one is pretty good, but I've run into an issue when I walk down a slope (although up is fine). Because the player walks faster than gravity pulls him down (I set it to 0 when he is on the ground), he detaches from the slope, which obviously is not desirable.

I've considered and tested several ways to fix this. One idea that I had was to check if there was ground below the character once he moved in the xz-direction, with a distance less than or equal to to the magnitude of that vector because I decided that a 45º slope was what the character could not walk up. That had a huge amount of problems and resulted in a lot of teleporting.

Then I tried to make it so when the player was on the ground that a really high gravity would be applied to keep him on the slope. This also didn't work because if the character was on the ground and then moved over a cliff, he was on the ground before he walked over the cliff he would be teleported down.

I'm really not sure how to progress here because logically the problem has stumped me. I took a look at some of the behavior of the Unreal character and it doesn't seem to suffer from any of these problems and it uses PhysX, so obviously they found a solution.

If anyone has any ideas, I would appreciate it.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.