Public updated property for camera class

This commit is contained in:
saschawillems 2018-04-08 12:27:45 +02:00
parent 2d3babb45a
commit f5ba1e8939
2 changed files with 6 additions and 1 deletions

View file

@ -37,6 +37,8 @@ private:
{
matrices.view = transM * rotM;
}
updated = true;
};
public:
enum CameraType { lookat, firstperson };
@ -48,6 +50,8 @@ public:
float rotationSpeed = 1.0f;
float movementSpeed = 1.0f;
bool updated = false;
struct
{
glm::mat4 perspective;
@ -120,6 +124,7 @@ public:
void update(float deltaTime)
{
updated = false;
if (type == CameraType::firstperson)
{
if (moving())