VideoCommon: change freelook camera fov step size and expose it
This commit is contained in:
parent
dc4b938526
commit
8ccb684711
|
@ -236,13 +236,18 @@ void FreeLookCamera::Rotate(const Common::Vec3& amt)
|
|||
void FreeLookCamera::IncreaseFovX(float fov)
|
||||
{
|
||||
m_fov_x += fov;
|
||||
m_fov_x = std::clamp(m_fov_x, 0.1f, m_fov_x);
|
||||
m_fov_x = std::clamp(m_fov_x, m_fov_step_size, m_fov_x);
|
||||
}
|
||||
|
||||
void FreeLookCamera::IncreaseFovY(float fov)
|
||||
{
|
||||
m_fov_y += fov;
|
||||
m_fov_y = std::clamp(m_fov_y, 0.1f, m_fov_y);
|
||||
m_fov_y = std::clamp(m_fov_y, m_fov_step_size, m_fov_y);
|
||||
}
|
||||
|
||||
float FreeLookCamera::GetFovStepSize() const
|
||||
{
|
||||
return m_fov_step_size;
|
||||
}
|
||||
|
||||
void FreeLookCamera::Reset()
|
||||
|
|
|
@ -54,6 +54,7 @@ public:
|
|||
|
||||
void IncreaseFovX(float fov);
|
||||
void IncreaseFovY(float fov);
|
||||
float GetFovStepSize() const;
|
||||
|
||||
void Reset();
|
||||
|
||||
|
@ -68,6 +69,8 @@ private:
|
|||
float m_fov_y = 1.0f;
|
||||
std::optional<FreelookControlType> m_current_type;
|
||||
std::unique_ptr<CameraController> m_camera_controller;
|
||||
|
||||
float m_fov_step_size = 0.025f;
|
||||
};
|
||||
|
||||
extern FreeLookCamera g_freelook_camera;
|
||||
|
|
Loading…
Reference in New Issue