public void resetForward(Vector3f vec) {
        if (vec == null) {
            vec = Vector3f.UNIT_Z;
        }
        localForward.set(vec);
        updateLocalCoordinateSystem();
    }
Realign the local forward vector to given direction vector, if null is
supplied Vector3f.UNIT_Z is used. The input vector must be perpendicular
to gravity vector. This normally only needs to be invoked when the
gravity direction changed continuously and the local forward vector is
off due to drift. E.g. after walking around on a sphere "planet" for a
while and then going back to a Y-up coordinate system the local Z-forward
might not be 100% aligned with the Z axis.

@param vec the desired forward vector (perpendicular to the gravity
vector, may be null, default=0,0,1)
jme3-jbullet/src/main/java/com/jme3/bullet/control/BetterCharacterControl.java