Skip to content

Commit

Permalink
Fixed set_pose in fps camera control
Browse files Browse the repository at this point in the history
  • Loading branch information
n-patiphon committed Jul 30, 2024
1 parent e67f794 commit ac101a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/guik/camera/fps_camera_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ Eigen::Matrix4f FPSCameraControl::projection_matrix() const {

void FPSCameraControl::set_pose(const Eigen::Vector3f& pos, double yaw_deg, double pitch_deg) {
this->pos = pos;
this->yaw = yaw * M_PI / 180.0;
this->pitch = pitch * M_PI / 180.0;
this->yaw = yaw_deg * M_PI / 180.0;
this->pitch = pitch_deg * M_PI / 180.0;
}

void FPSCameraControl::reset_center() {}
Expand Down Expand Up @@ -189,4 +189,4 @@ Eigen::Matrix4f FPSCameraControl::view_matrix() const {
glm::mat4 mat = glm::lookAt(glm::vec3(eye[0], eye[1], eye[2]), glm::vec3(center[0], center[1], center[2]), glm::vec3(up[0], up[1], up[2]));
return Eigen::Map<Eigen::Matrix4f>(glm::value_ptr(mat)).eval();
}
}
}

0 comments on commit ac101a2

Please sign in to comment.