Пример #1
0
 private float computeAnalogValue(long timeDelta) {
   if (safeMode || frameDelta == 0) {
     return 1f;
   } else {
     return FastMath.clamp((float) timeDelta / (float) frameDelta, 0, 1);
   }
 }
Пример #2
0
 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));
 }