By default, it seems PhysX sets the "friction" on your feet to infinity, so that calling move
with a downwards force (like gravity) doesn't cause you to slide down when standing on a sloped surface.
That's exactly the opposite of what I want though. I know of PxControllerNonWalkableMode::ePREVENT_CLIMBING_AND_FORCE_SLIDING
, but that doesn't seem to use any sort of gravity or acceleration, and I'm not using the built-in slopeLimit
value. There's also setPreventVerticalSlidingAgainstCeiling()
, so it seems kind of odd that something similar wouldn't exist for the floor.
So, is there any built-in way to disable this artificial friction, and allow sliding vertically in the same way the CCT can slide along walls and ceilings? And if not, how could I generate a new downward movement vector that follows the surface normal? I'm pretty terrible at anything related to math, so (psuedo-)code examples would be appreciated.