MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / detach

Method detach

Engine/source/T3D/physics/physicsForce.cpp:103–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void PhysicsForce::detach( const Point3F &force )
104{
105 if ( mBody && !force.isZero() )
106 {
107 Point3F cMass = mBody->getCMassPosition();
108 F32 mass = mBody->getMass();
109
110 Point3F impulse = ( mass * force ) / TickSec;
111 mBody->applyImpulse( cMass, impulse );
112 }
113
114 mBody = NULL;
115}
116
117void PhysicsForce::onMount( SceneObject *obj, S32 node )
118{

Callers 1

physicsForce.cppFile · 0.45

Calls 4

isZeroMethod · 0.45
getCMassPositionMethod · 0.45
getMassMethod · 0.45
applyImpulseMethod · 0.45

Tested by

no test coverage detected