Guest User

Untitled

a guest
May 25th, 2024
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. void UpdateCameraVectors() {
  2.     this->cDirection.x = cos(drx::math::Radians(this->yaw)) * cos(drx::math::Radians(this->pitch));
  3.     this->cDirection.y = sin(drx::math::Radians(this->pitch));
  4.     this->cDirection.z = sin(drx::math::Radians(this->yaw)) * cos(drx::math::Radians(this->pitch));
  5.     this->front = this->cDirection.Normalize();
  6.     this->right = this->worldUp.Cross(this->front).Normalize();
  7.     this->up = this->front.Cross(this->right).Normalize();
  8. }
Advertisement
Add Comment
Please, Sign In to add comment