clamp camera + pi
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
namespace td {
|
||||
|
||||
static constexpr float PI = 3.14159265358979323846264338327950288f;
|
||||
|
||||
template<typename T>
|
||||
struct Vec2 {
|
||||
union {
|
||||
|
||||
@@ -19,13 +19,14 @@ struct Camera {
|
||||
Vec3f CamPos {0, CamDistance, 0};
|
||||
Vec2f CamLook {};
|
||||
|
||||
float m_Yaw = -3.141592653f / 2.0f;
|
||||
float m_Pitch = -3.141592653f / 2.0f - 0.0000001f;
|
||||
float m_Yaw = -PI / 2.0f;
|
||||
float m_Pitch = -PI / 2.0f + 0.0000001f;
|
||||
};
|
||||
|
||||
class Renderer {
|
||||
public:
|
||||
static constexpr float m_AnimationSpeed = 2.0f;
|
||||
static constexpr float m_MouseSensitivity = 100.0f;
|
||||
|
||||
struct Model {
|
||||
GL::VertexArray* vao;
|
||||
|
||||
Reference in New Issue
Block a user