forked from Dynamitos/MeshShadingDemo
Update Seele
This commit is contained in:
1 parent
c6aecbc98b
commit
b063925b1b
6 files changed
+89
-7
No files matched your search
@@ -1,4 +1,5 @@
|
||||
#include "FlyCamSystem.h"
|
||||
#include <iostream>
|
||||
|
||||
FlyCamSystem::FlyCamSystem(PScene scene)
|
||||
: System::ComponentSystem<Component::KeyboardInput, Component::Camera, Component::Transform, Component::PointLight>(scene) {}
|
||||
@@ -30,11 +31,11 @@ void FlyCamSystem::update(Component::KeyboardInput& input, Component::Camera& ca
|
||||
}
|
||||
if(input.keys[KeyCode::KEY_A])
|
||||
{
|
||||
moveVector += side * -cameraMove;
|
||||
moveVector += side * cameraMove;
|
||||
}
|
||||
if(input.keys[KeyCode::KEY_D])
|
||||
{
|
||||
moveVector += side * cameraMove;
|
||||
moveVector += side * -cameraMove;
|
||||
}
|
||||
if(input.keys[KeyCode::KEY_E])
|
||||
{
|
||||
@@ -48,7 +49,7 @@ void FlyCamSystem::update(Component::KeyboardInput& input, Component::Camera& ca
|
||||
if(input.mouse2)
|
||||
{
|
||||
transform.setRotation(glm::rotate(transform.getRotation(), input.deltaX / 500, Vector(0, 1, 0)));
|
||||
transform.setRotation(glm::rotate(transform.getRotation(), input.deltaY / 500, transform.getRight()));
|
||||
transform.setRotation(glm::rotate(transform.getRotation(), -input.deltaY / 500, transform.getRight()));
|
||||
}
|
||||
light.attenuation += input.scrollY * 0.1;
|
||||
}
|
||||
Reference in new issue
Block a user