I am afraid this is a common question, but I couldn’t find a good answer, so here it is:
When my character hits a 10cm curb, he launches 2 meters up in the air… (approximate sizes)
- I am using BetterCharacterControl,
- gravity is default: (0, -9.81, 0), as it should be,
- I create the control using “new BetterCharacterControl(0.5f, 1.8f, 80f)”, so the characters size and weight should match those of a regular person.
any hints on how to solve this?
Thanks in advance
Maybe I should have looked a little bit better, because the class posted in this thread does seem to solve my issue: http://hub.jmonkeyengine.org/forum/topic/bettercharactercontrol-slopes/#post-260527
alternativly you could remove the curb, by placing a invisible ramp for the collisions.
That sounds surprisingly reasonable actually. However, an extra advantage of the class in post I linked is that it puts a limit to the steepness of an angle it can climb. Maybe the best solution would be a hybrid of these solutions: extend BetterCharacterControl to limit steepness and use invisible slopes for steps and stairs.
One issue remains however: at the moment I generate a collision mesh from my scene (all static objects), and I don’t see how I would do that if it has to include those invisible slopes.
Thanks in advance, Oebele
Well you could just set the cullhint of the invisible parts to always.