From 70a2cf27e3b68967dc8db26fb75d2afb259ec91e Mon Sep 17 00:00:00 2001 From: lindaandersson Date: Wed, 5 Feb 2014 11:53:38 +0100 Subject: [PATCH] GL - almost ok, at least on the top of the world --- Code/Game/DanBiasGame/GameClientState/GameState.cpp | 2 +- Code/Game/GameLogic/Level.cpp | 2 +- Code/Game/GameLogic/Player.cpp | 5 ----- Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp | 4 ++-- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Code/Game/DanBiasGame/GameClientState/GameState.cpp b/Code/Game/DanBiasGame/GameClientState/GameState.cpp index ff30a596..0102a027 100644 --- a/Code/Game/DanBiasGame/GameClientState/GameState.cpp +++ b/Code/Game/DanBiasGame/GameClientState/GameState.cpp @@ -454,7 +454,7 @@ void GameState::Protocol( ObjPos* pos ) camera->setRight(right); camera->setUp(up); - //camera->setLook(objForward); + camera->setLook(objForward); up *= 2; objForward *= -3; diff --git a/Code/Game/GameLogic/Level.cpp b/Code/Game/GameLogic/Level.cpp index 4abec0ab..0a2fd31b 100644 --- a/Code/Game/GameLogic/Level.cpp +++ b/Code/Game/GameLogic/Level.cpp @@ -84,7 +84,7 @@ void Level::InitiateLevel(float radius) int nrOfBoxex = 5; for(int i =0; i< nrOfBoxex; i ++) { - sbDesc_TestBox.centerPosition = Oyster::Math::Float4(10 + ( i*5) ,320,0,0); + sbDesc_TestBox.centerPosition = Oyster::Math::Float4(20 ,320,0 + ( i*7),0); rigidBody_TestBox = API::Instance().CreateRigidBody(sbDesc_TestBox).Release(); rigidBody_TestBox->SetSubscription(Level::PhysicsOnMoveLevel); diff --git a/Code/Game/GameLogic/Player.cpp b/Code/Game/GameLogic/Player.cpp index 5b3657fe..9b0c29ee 100644 --- a/Code/Game/GameLogic/Player.cpp +++ b/Code/Game/GameLogic/Player.cpp @@ -154,11 +154,6 @@ void Player::Rotate(const Oyster::Math3D::Float4 lookDir) { int i =0 ; } - //Oyster::Math::Float3 up = currPhysicsState.GetOrientation().v[1]; - //Oyster::Math::Float3 deltaAxis = up * (-dx * 0.02) ; - //Oyster::Math::Float3 oldOrt = currPhysicsState.GetRotation(); - - //newPhysicsState.SetRotation(oldOrt + deltaAxis); this->lookDir = lookDir.xyz; this->dx = lookDir.w; diff --git a/Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp b/Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp index e6f96c3e..7981322f 100644 --- a/Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp +++ b/Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp @@ -91,7 +91,7 @@ namespace } // PLayerHAck - /*if( proto->CallSubscription_BeforeCollisionResponse(proto) == ICustomBody::SubscriptMessage_player_collision_response ) + if( proto->CallSubscription_BeforeCollisionResponse(proto) == ICustomBody::SubscriptMessage_player_collision_response ) { Float3 linearMomentum = protoState.GetLinearMomentum(); Float3 up = -protoState.GetGravityNormal(); @@ -101,7 +101,7 @@ namespace protoState.SetLinearMomentum(noBounceForce); proto->SetState(protoState); return; - }*/ + } // calculate and store time interpolation value, for later rebound. proto->SetTimeOfContact( worldPointOfContact );