From 3bcdb3c06700679035a716bf0e22e72c1df70b1c Mon Sep 17 00:00:00 2001 From: Tobias Dahl Date: Wed, 12 Mar 2014 18:42:03 +0100 Subject: [PATCH] Fixade en camera --- Escape-the-Dawn/GameWorld.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Escape-the-Dawn/GameWorld.cpp b/Escape-the-Dawn/GameWorld.cpp index 3844113..56a1d10 100644 --- a/Escape-the-Dawn/GameWorld.cpp +++ b/Escape-the-Dawn/GameWorld.cpp @@ -19,6 +19,17 @@ void GameWorld::Initialize() std::shared_ptr camera; EntityID ent; + ent = CreateEntity(); + SetProperty(ent, "Name", std::string("Camera")); + transform = AddComponent(ent, "Transform"); + AddComponent(ent, "Input"); + transform->Position = glm::vec3(0.f, 2.f, 10.f); + camera = AddComponent(ent, "Camera"); + camera->FOV = 45.f; + camera->FarClip = 1000.f; + camera->NearClip = 0.01f; + transform->Orientation = glm::angleAxis(glm::radians(25.0f),glm::vec3(1,0,0)); + // Fucking lights ent = CreateEntity(); transform = AddComponent(ent, "Transform");