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
@@ -184,7 +184,7 @@ void MeshShadingDemoGame::setupScene(PScene scene, PSystemGraph graph)
|
||||
}
|
||||
|
||||
|
||||
test = new StaticMeshActor(scene, AssetRegistry::findMesh("", "cube"));
|
||||
test = new StaticMeshActor(scene, AssetRegistry::findMesh("rttest", "rttest"));
|
||||
//test->getTransform().setScale(Vector(0.01, 0.01, 0.01));
|
||||
|
||||
/*for (int32 y = -40; y < 40; ++y)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <System/ComponentSystem.h>
|
||||
#include <Component/Camera.h>
|
||||
#include <Component/KeyboardInput.h>
|
||||
#include <Component/PointLight.h>
|
||||
|
||||
class FlyCamSystem : public System::ComponentSystem<
|
||||
Component::KeyboardInput,
|
||||
|
||||
Reference in new issue
Block a user