fix cam sensitivity
This commit is contained in:
@@ -9,10 +9,10 @@ namespace blitz {
|
||||
namespace render {
|
||||
|
||||
void Camera::Update(float delta) {
|
||||
static const float MouseSpeed = 0.0025f;
|
||||
if (ImGui::GetIO().MouseDown[0]) {
|
||||
// slower when more fps. why ?
|
||||
m_Yaw += ImGui::GetIO().MouseDelta.x * delta * 0.2f;
|
||||
m_Pitch -= ImGui::GetIO().MouseDelta.y * delta * 0.2f;
|
||||
m_Yaw += ImGui::GetIO().MouseDelta.x * MouseSpeed;
|
||||
m_Pitch -= ImGui::GetIO().MouseDelta.y * MouseSpeed;
|
||||
m_Pitch = std::clamp(m_Pitch, -maths::PI / 2.0f + 0.001f, maths::PI / 2.0f - 0.001f);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user