I try to create a character which the user can move through a landscape. The problem is that whenever the character runs against a steep slope, it bounces high. Changing the Gravity didn’t change anything - the character flew as high as before. For the physical landscape I use a RigidBodyControl, for the physical character a BetterCharacterControl.
I set the walkDirection like that:
[java]
@Override
protected void controlUpdate(float tpf){
Vector3f walkDirection = new Vector3f(0, 0, 0);
if (listener.getForward()){
walkDirection.addLocal(getViewDirection());
}
if (listener.getBackward()){
walkDirection.addLocal(getViewDirection().negate());
}
if (listener.getLeftward()){
walkDirection.addLocal(getViewLeftDirection());
}
if (listener.getRightward()){
walkDirection.addLocal(getViewLeftDirection().negate());
}
if (listener.refreshJump()){
creature.jump();
}
walkDirection = walkDirection.setY(0).normalize().mult(8);
creature.setWalkDirection(walkDirection);
creature.setViewDirection(getViewDirection().negate());
this.cc.getCam().setLocation(spatial.getWorldTranslation().subtract(getViewDirection().mult(40)).addLocal(new Vector3f(0, 14, 0)));
}
[java]
The object creature delegates the setWalkDirection() and setViewDirection() without a change to the BetterCharacterControl
This bouncing is not what I want of course. Can somebody tell me how to make the character go upwards without bouncing?