Skip to content
Snippets Groups Projects
Commit 4d1a5c0d authored by Vanessa Karolek's avatar Vanessa Karolek
Browse files

[#42][Fix] clamp yaw member in camera class ass well

parent 8fee845f
No related branches found
No related tags found
1 merge request!35Resolve "Kamera - Trackballkamera"
Pipeline #25342 passed
...@@ -144,6 +144,12 @@ namespace vkcv { ...@@ -144,6 +144,12 @@ namespace vkcv {
} }
void Camera::setYaw(float yaw) { void Camera::setYaw(float yaw) {
if (yaw < 0.0f) {
yaw += 360.0f;
}
else if (yaw > 360.0f) {
yaw -= 360.0f;
}
m_yaw = yaw; m_yaw = yaw;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment