PhysicsShape applyForce function

This commit is contained in:
rextimmy 2017-01-05 10:38:05 +10:00
parent 8a39f5e7b6
commit 1559e7a3d3
7 changed files with 51 additions and 3 deletions

View file

@ -427,6 +427,16 @@ void Px3Body::applyTorque( const Point3F &torque )
actor->addTorque( px3Cast<physx::PxVec3>(torque), physx::PxForceMode::eFORCE, true);
}
void Px3Body::applyForce( const Point3F &force )
{
AssertFatal(mActor, "Px3Body::applyTorque - The actor is null!");
mWorld->releaseWriteLock();
physx::PxRigidDynamic *actor = mActor->is<physx::PxRigidDynamic>();
if (mIsEnabled && isDynamic())
actor->addForce( px3Cast<physx::PxVec3>(force), physx::PxForceMode::eFORCE, true);
}
void Px3Body::findContact(SceneObject **contactObject,
VectorF *contactNormal,
Vector<SceneObject*> *outOverlapObjects) const