Hello,
I implemented a small charactercontroller with a capsule as collisionshape (can only rotate on one axis).
The ground consists of a bvhTriangleMesh.
How can I implement now, that the character can't walk up to steeply hills? When I'm increase the friction of ground and character, the character is upstairs slower, but when it walks zigzag, it's still possible to walk up.
I would say this is not the question for Bullet, it is the problem of your character controller.
The easiest way is to make this character as a kinematic character, in this way, you directly control the position of the character.
If you want to apply force/torque to the body parts to move the character, that's more complex, there are a lot of research going on in the academic areas.
There's always the simple trick that consist of telling your character controller that it cannot move the player uphill if the normal's angle with the player vertical axis is to high...
...of course the character controller than move the character on the horizontal axis of the hill's plane.
Barratator wrote:How can I implement now, that the character can't walk up to steeply hills? When I'm increase the friction of ground and character, the character is upstairs slower, but when it walks zigzag, it's still possible to walk up.
Any idea?
My best bet is that you're summing "movement intentions" and your code evaluates steepness over this vector. Diagonal movement has a longer vector so it wrongly detects less slope than it should, or perhaps it allows more vertical displacement as a function of movement vector length.
Just guessing.
Barratator wrote:The ground consists of a bvhTriangleMesh.
What's the deal with triangle soups? No love for the simple shapes?
Maybe i am totally off, but maybe you are propulsing your character via impulse/force which vector do not take account of the Y (UP) element?
So moving the character in zigzag would have less slope so the straight force vector (forward,side without up element) would have less resistance (dot product between slope vector and force vector is lower) then directly up the hill (dot product between slope vector and force vector is higher).