protected void updateLocalCoordinateSystem() {
        //gravity vector has possibly changed, calculate new world forward (UNIT_Z)
        calculateNewForward(localForwardRotation, localForward, localUp);
        localLeft.set(localUp).crossLocal(localForward);
        rigidBody.setPhysicsRotation(localForwardRotation);
        updateLocalViewDirection();
    }
Updates the local coordinate system from the localForward and localUp
vectors, adapts localForward, sets localForwardRotation quaternion to
local Z-forward rotation.
jme3-jbullet/src/main/java/com/jme3/bullet/control/BetterCharacterControl.java