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

Method detach

Engine/source/T3D/physics/physicsForce.cpp:101–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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