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

Method attach

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

Source from the content-addressed store, hash-verified

86}
87
88void PhysicsForce::attach( const Point3F &start, const Point3F &direction, F32 maxDist )
89{
90 detach();
91
92 // If there is no physics world then we cannot apply any forces.
93 if ( !mWorld )
94 return;
95
96 PhysicsBody *body = mWorld->castRay( start, start + ( direction * maxDist ), PhysicsWorld::BT_Dynamic );
97 if ( !body )
98 return;
99
100 mBody = body;
101}
102
103void PhysicsForce::detach( const Point3F &force )
104{

Callers 1

physicsForce.cppFile · 0.45

Calls 1

castRayMethod · 0.45

Tested by

no test coverage detected