clamp camera + pi
This commit is contained in:
@@ -93,8 +93,8 @@ void Renderer::SetZoom(float zoom) {
|
||||
}
|
||||
|
||||
void Renderer::SetCamMovement(const Vec2f& mov) {
|
||||
m_Camera.m_Pitch -= mov.y / 50.0f;
|
||||
m_Camera.m_Yaw += mov.x / 50.0f;
|
||||
m_Camera.m_Pitch = std::clamp(m_Camera.m_Pitch - mov.y / m_MouseSensitivity, -PI / 2.0f + 0.0000001f, -PI / 12.0f );
|
||||
m_Camera.m_Yaw += mov.x / m_MouseSensitivity;
|
||||
SetCamLook(m_Camera.CamLook);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user