SHARE
TWEET

Untitled

a guest Jun 16th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cameraOrientation = cameraOrientation * framePitch * frameYaw;
  2.      
  3. cameraOrientation = framePitch * cameraOrientation * frameYaw;
  4.      
  5. currentDirection * newRotation;
  6.      
  7. newRotation * currentDirection;
  8.      
  9. if (keyboard.IsKeyDown(Keys.Up))
  10.             Direction = Direction * Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), TurnSpeed);
  11.         if (keyboard.IsKeyDown(Keys.Down))
  12.             Direction = Direction * Quaternion.CreateFromAxisAngle(new Vector3(-1, 0, 0), TurnSpeed);
  13.         if (keyboard.IsKeyDown(Keys.Left))
  14.             Direction = Quaternion.CreateFromAxisAngle(new Vector3(0, 0, 1), TurnSpeed) * Direction;
  15.         if (keyboard.IsKeyDown(Keys.Right))
  16.             Direction = Quaternion.CreateFromAxisAngle(new Vector3(0, 0, -1), TurnSpeed) * Direction;
  17.      
  18. playerCameraHolder.transform.Rotate(0, rotationYaw, 0);
  19. playerCamera.transform.Rotate(rotationPitch, 0, 0);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top