Friction Issues - Jumping and Crouching

I’m working on a side scroll concept with JME3 and am currently getting a feel for the engine and what’s possible. I’ve run into a couple of minor issues and wanted some feedback.

Issue 1: When running up next to a wall and jumping the player will get stuck (won’t jump) if pressing forward into an obstacle while attempting to jump. Likewise if the player jumps onto a wall and continues to press over, the player will be stuck on the wall and not slide down it.

Issue 2: When coming up next to an obstacle that needs to be crouched to pass under if the player is against the obstacle and then crouches the player will not move forward underneath unless the player crouches before arriving at said obstacle.

In general I have been able to resolve issue one(1) with setting the friction of the object to 0. However it would seem that this should affect all of the obstacle and make it like ice when walking on it, which does not occur. Which is really what I want but doesn’t seem correct. Plus it seems one should be able to set the friction of each object face or material for that face instead of setting the whole object. Looking for insight on this behavior. Also, is there another solution that is more correct?

For Issue 2 I have not come up with any solution, thoughts?


What collision shape are you using? If it’s a mesh shape, it probably has lots of sharp points and edges which can get caught on things. For players I generally use smooth shapes like capsules.

I am currently using a capsule for collision and my model is just a cylinder at this point.

Issue 1 i have only solved half, make depending on the onGround change the friction between default and 0.
Btw there does exist a multimaterial mesh collision shape in bullet, but it is not yet wrapped for jme.

If it would help I can provide a link to the source code.