1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 09:53:51 +00:00

fix the fall bug when using ToggleCollision

This commit is contained in:
gugus 2011-03-20 21:51:40 +01:00
parent 25b3cf9359
commit 8f9b8749d4
4 changed files with 13 additions and 0 deletions

View file

@ -140,6 +140,10 @@ btKinematicCharacterController::~btKinematicCharacterController ()
{ {
} }
void btKinematicCharacterController::setVerticalVelocity(float z)
{
m_verticalVelocity = z;
}
bool btKinematicCharacterController::recoverFromPenetration( btCollisionWorld* collisionWorld ) bool btKinematicCharacterController::recoverFromPenetration( btCollisionWorld* collisionWorld )
{ {

View file

@ -101,6 +101,7 @@ public:
~btKinematicCharacterController (); ~btKinematicCharacterController ();
void setVerticalVelocity(float z);
///btActionInterface interface ///btActionInterface interface
virtual void updateAction( btCollisionWorld* collisionWorld, btScalar deltaTime ) virtual void updateAction( btCollisionWorld* collisionWorld, btScalar deltaTime )

View file

@ -76,6 +76,7 @@ namespace Physic
void PhysicActor::setGravity(float gravity) void PhysicActor::setGravity(float gravity)
{ {
mCharacter->setGravity(gravity); mCharacter->setGravity(gravity);
//mCharacter->
} }
void PhysicActor::enableCollisions(bool collision) void PhysicActor::enableCollisions(bool collision)
@ -83,6 +84,11 @@ namespace Physic
mCharacter->mCollision = collision; mCharacter->mCollision = collision;
} }
void PhysicActor::setVerticalVelocity(float z)
{
mCharacter->setVerticalVelocity(z);
}
bool PhysicActor::getCollisionMode() bool PhysicActor::getCollisionMode()
{ {
return mCharacter->mCollision; return mCharacter->mCollision;

View file

@ -67,6 +67,8 @@ namespace Physic
void setRotation(const btQuaternion& quat); void setRotation(const btQuaternion& quat);
void setGravity(float gravity); void setGravity(float gravity);
void setVerticalVelocity(float z);
void enableCollisions(bool collision); void enableCollisions(bool collision);