camera fixing

This commit is contained in:
2023-06-06 13:07:42 +02:00
parent 83ab8c70f0
commit 48841fa4e9
3 changed files with 24 additions and 4 deletions

View File

@@ -15,7 +15,9 @@ struct Camera {
Mat4f InvViewMatrix;
Mat4f InvProjectionMatrix;
Vec3f CamPos;
Vec3f CamPos {0, 25, 0};
Vec2f CamLook {};
Vec3f m_Front {0, -1, 0};
@@ -55,13 +57,14 @@ public:
void SetZoom(float zoom);
void SetCamMovement(const Vec2f& mov);
void SetCamPos(const Vec3f& newPos);
void SetCamLook(const Vec2f& worldPos);
void SetBackgroundColor(const Vec3f& color) { m_BackgroundColor = color; }
Vec2f GetCursorWorldPos(const Vec2f& cursorPos, float windowWidth, float windowHeight);
private:
void InitShaders();
void SetCamPos(const Vec3f& newPos);
};
} // namespace render