Merge remote-tracking branch 'origin/Physics' into GameClientGraphics

This commit is contained in:
lindaandersson 2014-02-20 16:38:41 +01:00
commit f03da77a55
3 changed files with 16 additions and 0 deletions

View File

@ -413,3 +413,13 @@ float SimpleRigidBody::GetLambda() const
{ {
return this->rayLambda[0]; return this->rayLambda[0];
} }
void SimpleRigidBody::MoveToLimbo()
{
this->rigidBody->setCollisionFlags(this->rigidBody->getCollisionFlags() | btCollisionObject::CF_NO_CONTACT_RESPONSE);
}
void SimpleRigidBody::ReleaseFromLimbo()
{
this->rigidBody->setCollisionFlags(btCollisionObject::CF_KINEMATIC_OBJECT);
}

View File

@ -69,6 +69,9 @@ namespace Oyster
float GetLambda() const; float GetLambda() const;
void MoveToLimbo();
void ReleaseFromLimbo();
private: private:
btCollisionShape* collisionShape; btCollisionShape* collisionShape;

View File

@ -169,6 +169,9 @@ namespace Oyster
virtual void CallSubscription_AfterCollisionResponse(ICustomBody* bodyA, ICustomBody* bodyB, Math::Float kineticEnergyLoss) = 0; virtual void CallSubscription_AfterCollisionResponse(ICustomBody* bodyA, ICustomBody* bodyB, Math::Float kineticEnergyLoss) = 0;
virtual void CallSubscription_Move() = 0; virtual void CallSubscription_Move() = 0;
virtual void MoveToLimbo() = 0;
virtual void ReleaseFromLimbo() = 0;
/******************************************************** /********************************************************
* @return the void pointer set by SetCustomTag. * @return the void pointer set by SetCustomTag.
* nullptr if none is set. * nullptr if none is set.