mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-20 20:05:33 +00:00
PhysicsShape applyForce function
This commit is contained in:
parent
8a39f5e7b6
commit
1559e7a3d3
7 changed files with 51 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue