GL - almost ok, at least on the top of the world

This commit is contained in:
lindaandersson 2014-02-05 11:53:38 +01:00
parent 426444ca34
commit 70a2cf27e3
4 changed files with 4 additions and 9 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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 );