Calculate Camera Drag speed.
- Returns
- Returns the camera drag speed in x direction and y direction.
Definition at line 160 of file CameraController.cpp.
161 {
163
164 const float x = std::min(
static_cast<float>(
m_ViewportWidth) / 1000.0f, 2.4f);
165 float xFactor = 0.0366f * (x * x) - 0.1778f * x + 0.3021f;
166
167 const float y = std::min(
static_cast<float>(
m_ViewportHeight) / 1000.0f, 2.4f);
168 float yFactor = 0.0366f * (y * y) - 0.1778f * y + 0.3021f;
169
170 return { xFactor, yFactor };
171 }
#define SPICES_PROFILE_ZONE
uint32_t m_ViewportWidth
The Viewport size.
uint32_t m_ViewportHeight
References m_ViewportHeight, and m_ViewportWidth.
Referenced by MousePan().