GL - added error checking
This commit is contained in:
parent
6e0dd63d64
commit
ec4d34b131
|
@ -140,8 +140,17 @@ void Object::BeginFrame()
|
|||
// update physic
|
||||
void Object::EndFrame()
|
||||
{
|
||||
if(currPhysicsState.GetLinearMomentum() !=currPhysicsState.GetLinearMomentum())
|
||||
{
|
||||
//error
|
||||
int i =0 ;
|
||||
}
|
||||
this->currPhysicsState = this->rigidBody->GetState();
|
||||
|
||||
if(currPhysicsState.GetLinearMomentum() !=currPhysicsState.GetLinearMomentum())
|
||||
{
|
||||
//error
|
||||
int i =0 ;
|
||||
}
|
||||
if(currPhysicsState.GetGravityNormal() !=currPhysicsState.GetGravityNormal())
|
||||
{
|
||||
//error
|
||||
|
@ -163,6 +172,11 @@ void Object::EndFrame()
|
|||
}
|
||||
|
||||
|
||||
if(currPhysicsState.GetLinearMomentum() !=currPhysicsState.GetLinearMomentum())
|
||||
{
|
||||
//error
|
||||
int i =0 ;
|
||||
}
|
||||
|
||||
this->newPhysicsState = this->currPhysicsState;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
using namespace GameLogic;
|
||||
using namespace Oyster::Physics;
|
||||
const int MOVE_FORCE = 50000;
|
||||
const int MOVE_FORCE = 5000;
|
||||
Player::Player()
|
||||
:DynamicObject()
|
||||
{
|
||||
|
@ -73,7 +73,6 @@ void Player::EndFrame()
|
|||
|
||||
Oyster::Math::Float3 up = currPhysicsState.GetOrientation().v[1];
|
||||
Oyster::Math::Float3 deltaAxis = up * (-dx * 0.02) ;
|
||||
Oyster::Math::Float3 oldOrt = currPhysicsState.GetRotation();
|
||||
|
||||
currPhysicsState.AddRotation(deltaAxis);
|
||||
dx = 0;
|
||||
|
|
Loading…
Reference in New Issue