Experiment - Release from limbo
This commit is contained in:
parent
7f4120e807
commit
d7e0b55a82
|
@ -22,6 +22,8 @@ SimpleRigidBody::SimpleRigidBody()
|
||||||
this->state.restitutionCoeff = 0.0f;
|
this->state.restitutionCoeff = 0.0f;
|
||||||
this->state.reach = Float3(0.0f, 0.0f, 0.0f);
|
this->state.reach = Float3(0.0f, 0.0f, 0.0f);
|
||||||
|
|
||||||
|
this->collisionFlags = 0;
|
||||||
|
|
||||||
this->afterCollision = NULL;
|
this->afterCollision = NULL;
|
||||||
this->onMovement = NULL;
|
this->onMovement = NULL;
|
||||||
|
|
||||||
|
@ -85,7 +87,7 @@ void SimpleRigidBody::SetMotionState(btDefaultMotionState* motionState)
|
||||||
void SimpleRigidBody::SetRigidBody(btRigidBody* rigidBody)
|
void SimpleRigidBody::SetRigidBody(btRigidBody* rigidBody)
|
||||||
{
|
{
|
||||||
this->rigidBody = rigidBody;
|
this->rigidBody = rigidBody;
|
||||||
|
this->collisionFlags = rigidBody->getCollisionFlags();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimpleRigidBody::SetSubscription(EventAction_AfterCollisionResponse function)
|
void SimpleRigidBody::SetSubscription(EventAction_AfterCollisionResponse function)
|
||||||
|
@ -421,7 +423,7 @@ void SimpleRigidBody::MoveToLimbo()
|
||||||
|
|
||||||
void SimpleRigidBody::ReleaseFromLimbo()
|
void SimpleRigidBody::ReleaseFromLimbo()
|
||||||
{
|
{
|
||||||
this->rigidBody->setCollisionFlags(btCollisionObject::CF_KINEMATIC_OBJECT);
|
this->rigidBody->setCollisionFlags(this->collisionFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimpleRigidBody::SetPreviousVelocity(::Oyster::Math::Float3 velocity)
|
void SimpleRigidBody::SetPreviousVelocity(::Oyster::Math::Float3 velocity)
|
||||||
|
|
|
@ -93,6 +93,8 @@ namespace Oyster
|
||||||
btVector3 raySource[2];
|
btVector3 raySource[2];
|
||||||
btVector3 rayTarget[2];
|
btVector3 rayTarget[2];
|
||||||
btScalar rayLambda[2];
|
btScalar rayLambda[2];
|
||||||
|
|
||||||
|
int collisionFlags;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue