diff --git a/bullet/btKinematicCharacterController.cpp b/bullet/btKinematicCharacterController.cpp index e2bd63ebf..d93034985 100644 --- a/bullet/btKinematicCharacterController.cpp +++ b/bullet/btKinematicCharacterController.cpp @@ -140,6 +140,10 @@ btKinematicCharacterController::~btKinematicCharacterController () { } +void btKinematicCharacterController::setVerticalVelocity(float z) +{ + m_verticalVelocity = z; +} bool btKinematicCharacterController::recoverFromPenetration( btCollisionWorld* collisionWorld ) { diff --git a/bullet/btKinematicCharacterController.h b/bullet/btKinematicCharacterController.h index e851e1cb8..d58e242ad 100644 --- a/bullet/btKinematicCharacterController.h +++ b/bullet/btKinematicCharacterController.h @@ -101,6 +101,7 @@ public: ~btKinematicCharacterController (); + void setVerticalVelocity(float z); ///btActionInterface interface virtual void updateAction( btCollisionWorld* collisionWorld, btScalar deltaTime ) diff --git a/bullet/physic.cpp b/bullet/physic.cpp index d0be072f3..742f99436 100644 --- a/bullet/physic.cpp +++ b/bullet/physic.cpp @@ -76,6 +76,7 @@ namespace Physic void PhysicActor::setGravity(float gravity) { mCharacter->setGravity(gravity); + //mCharacter-> } void PhysicActor::enableCollisions(bool collision) @@ -83,6 +84,11 @@ namespace Physic mCharacter->mCollision = collision; } + void PhysicActor::setVerticalVelocity(float z) + { + mCharacter->setVerticalVelocity(z); + } + bool PhysicActor::getCollisionMode() { return mCharacter->mCollision; diff --git a/bullet/physic.hpp b/bullet/physic.hpp index 9178a5779..0cf6abd4f 100644 --- a/bullet/physic.hpp +++ b/bullet/physic.hpp @@ -67,6 +67,8 @@ namespace Physic void setRotation(const btQuaternion& quat); void setGravity(float gravity); + + void setVerticalVelocity(float z); void enableCollisions(bool collision);