1 #ifndef CHARACTER_CONTROLLER_H
2 #define CHARACTER_CONTROLLER_H
4 #include "LinearMath/btVector3.h"
6 #include "BulletDynamics/Character/btCharacterControllerInterface.h"
8 class btCollisionShape;
10 class btCollisionWorld;
12 ///DynamicCharacterController is obsolete/unsupported at the moment
13 class DynamicCharacterController : public btCharacterControllerInterface
16 btScalar m_halfHeight;
17 btCollisionShape* m_shape;
18 btRigidBody* m_rigidBody;
20 btVector3 m_raySource[2];
21 btVector3 m_rayTarget[2];
22 btScalar m_rayLambda[2];
23 btVector3 m_rayNormal[2];
27 btScalar m_maxLinearVelocity;
28 btScalar m_walkVelocity;
29 btScalar m_turnVelocity;
31 DynamicCharacterController ();
32 ~DynamicCharacterController ();
33 void setup (btScalar height = 2.0, btScalar width = 0.25, btScalar stepHeight = 0.25);
36 virtual void reset ();
37 virtual void warp (const btVector3& origin);
38 virtual void registerPairCacheAndDispatcher (btOverlappingPairCache* pairCache, btCollisionDispatcher* dispatcher);
40 btCollisionObject* getCollisionObject ();
42 void preStep (const btCollisionWorld* collisionWorld);
43 void playerStep (const btCollisionWorld* collisionWorld,btScalar dt,
49 bool canJump () const;
52 bool onGround () const;