Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cameraOrientation = cameraOrientation * framePitch * frameYaw;
- cameraOrientation = framePitch * cameraOrientation * frameYaw;
- currentDirection * newRotation;
- newRotation * currentDirection;
- if (keyboard.IsKeyDown(Keys.Up))
- Direction = Direction * Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), TurnSpeed);
- if (keyboard.IsKeyDown(Keys.Down))
- Direction = Direction * Quaternion.CreateFromAxisAngle(new Vector3(-1, 0, 0), TurnSpeed);
- if (keyboard.IsKeyDown(Keys.Left))
- Direction = Quaternion.CreateFromAxisAngle(new Vector3(0, 0, 1), TurnSpeed) * Direction;
- if (keyboard.IsKeyDown(Keys.Right))
- Direction = Quaternion.CreateFromAxisAngle(new Vector3(0, 0, -1), TurnSpeed) * Direction;
- playerCameraHolder.transform.Rotate(0, rotationYaw, 0);
- playerCamera.transform.Rotate(rotationPitch, 0, 0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement