Is this something new? Shouldn’t gravity be set before adding to the physics space?
Works fine for me.
playerControl = new BetterCharacterControl(1.5f, 6f, 1f); // construct character. (If your character bounces, try increasing height and weight.)
playerNode.addControl(playerControl); // attach to wrapper
// set basic physical properties:
playerControl.setJumpForce(new Vector3f(0,5f,0));
playerControl.setGravity(new Vector3f(0,1f,0));
playerControl.warp(new Vector3f(0,10,10)); // warp character into landscape at particular location
// add to physics state
bulletAppState.getPhysicsSpace().add(playerControl);
rootNode.attachChild(playerNode); // add wrapper to root
When you add it to the physicsspace it adopts the physicsspace gravity so it will be overwritten if you set it before. This basically means all physics objects have the same gravity as the physics space by default. So if you want it to be different you have to set it after.
I’m pretty sure it’s always been like that, but I could be wrong.