From 00400a7d32bdb789761112f71b3654c94699e39b Mon Sep 17 00:00:00 2001 From: lindaandersson Date: Tue, 4 Feb 2014 10:38:59 +0100 Subject: [PATCH] GL - camera testing --- Code/Game/DanBiasGame/GameClientState/GameState.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Code/Game/DanBiasGame/GameClientState/GameState.cpp b/Code/Game/DanBiasGame/GameClientState/GameState.cpp index b1bc4881..e57d004d 100644 --- a/Code/Game/DanBiasGame/GameClientState/GameState.cpp +++ b/Code/Game/DanBiasGame/GameClientState/GameState.cpp @@ -389,10 +389,12 @@ void GameState::Protocol( ObjPos* pos ) //camera->setLook((Oyster::Math::Float3(world[8], world[9], world[10]))); if(i == myId) // playerobj { - Oyster::Math::Float3 up = (Oyster::Math::Float3(world[4], world[5], world[6])); - Oyster::Math::Float3 pos = Oyster::Math::Float3(world[12], world[13]+2, world[14]); - Oyster::Math::Float3 cameraPos = up + pos; - camera->SetPosition(cameraPos); + camera->setRight((Oyster::Math::Float3(world[0], world[1], world[2]))); + camera->setUp(Oyster::Math::Float3(world[4], world[5], world[6])); + //camera->setLook((Oyster::Math::Float3(world[8], world[9], world[10]))); + Oyster::Math::Float3 pos = Oyster::Math::Float3(world[12], world[13]+2, world[14]+2); + //Oyster::Math::Float3 cameraPos = up + pos; + camera->SetPosition(pos); camera->UpdateViewMatrix(); } }