private float computeAnalogValue(long timeDelta) { if (safeMode || frameDelta == 0) { return 1f; } else { return FastMath.clamp((float) timeDelta / (float) frameDelta, 0, 1); } }
private void lookUpDown(final float v) { yaw += v; yaw = FastMath.clamp(yaw, -FastMath.HALF_PI, FastMath.HALF_PI); head.setLocalRotation(new Quaternion().fromAngles(yaw, 0, 0)); }