@ -28,7 +28,7 @@ namespace Physic
} ;
PhysicActor : : PhysicActor ( std : : string name , std : : string mesh , PhysicEngine * engine , Ogre : : Vector3 position , Ogre : : Quaternion rotation , float scale ) :
mName ( name ) , mEngine ( engine ) , mMesh ( mesh ) , mBoxScaledTranslation ( 0 , 0 , 0 ) , mBoxRotationInverse ( 0 , 0 , 0 , 0 ) , mBody ( 0 ) , collisionMode ( false ) , mBoxRotation ( 0 , 0 , 0 , 0 )
mName ( name ) , mEngine ( engine ) , mMesh ( mesh ) , mBoxScaledTranslation ( 0 , 0 , 0 ) , mBoxRotationInverse ( 0 , 0 , 0 , 0 ) , mBody ( 0 ) , collisionMode ( false ) , mBoxRotation ( 0 , 0 , 0 , 0 ) , verticalForce ( 0.0f )
{
mBody = mEngine - > createAndAdjustRigidBody ( mMesh , mName , scale , position , rotation , & mBoxScaledTranslation , & mBoxRotation ) ;
Ogre : : Quaternion inverse = mBoxRotation . Inverse ( ) ;
@ -170,6 +170,17 @@ namespace Physic
return Ogre : : Vector3 ( 0.0f ) ;
}
void PhysicActor : : setVerticalForce ( float force )
{
verticalForce = force ;
}
float PhysicActor : : getVerticalForce ( ) const
{
return verticalForce ;
}
void PhysicActor : : runPmove ( ) {
Pmove ( pmove ) ;
Ogre : : Vector3 newpos = pmove - > ps . origin ;