Is there a way to set a threshold on what angle of slope a character will slide down? I tried using friction on the terrain but the character still slips down small slopes. If my character comes to a complete stop on a slope, he just starts to slowly slide down, and I would rather have him come to complete stop with out sliding unless the slope is just to great.
Edit: As suggested on the Wiki “Physics: Gravity, Collisions, Forces” page, the character is using a CapsuleCollisionShape.
setMaxSlope?
From (https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:walking_character) :
“How steep the slopes and steps are that the character can climb without considering them an obstacle. Higher obstacles need to be jumped. Vertical height in world units.”
My character can climb the slope I’m playing with, but when I stop moving I want to stay there and not slide down. Currently the character is sliding down until A) it hits a level surface B) it hits a low point between sloped faces.
In the real world, you can walk up a 5 degree grass hill or paved road and stop half way up and not slide down. So far I haven’t found a way to duplicate that in JME.
Well bullets character isn’t very advanced, the more control you want the more you’ll have to create your own character based on sweep tests and a kinematic rigidbody.
you could fire a ray down, and get the angle between Y up and the surface normal. If its small and your currently not moving the character yourself, then make him stay still
Don’t know enough about how all the physics work, but if there is a method ins side CharacterControl that calculates the amount of move on a slope, I can override it with a sub class if you can direct me at which method to override. Don’t want to rewrite the whole thing because so far this is the only issue I’m having with it.
I had the same problem. I had to increase my CharacterControl’s collision shape to > 3F and that fixed it. Anything under that and you get strange fall-down effects. If you try to stand on a rigid body with height < 3 you sort of fall through it. Just try setting your height to around 3.5 or 4. Mine is at 4.75F default, 2.75F crouching. Hope that helps!