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

Method setDeployedPos

Engine/source/T3D/proximityMine.cpp:379–394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377}
378
379void ProximityMine::setDeployedPos( const Point3F& pos, const Point3F& normal )
380{
381 // Align to deployed surface normal
382 MatrixF mat( true );
383 MathUtils::getMatrixFromUpVector( normal, &mat );
384 mat.setPosition( pos + normal * mObjBox.minExtents.z );
385
386 mDelta.pos = pos;
387 mDelta.posVec.set(0, 0, 0);
388
389 ShapeBase::setTransform( mat );
390 if ( mPhysicsRep )
391 mPhysicsRep->setTransform( getTransform() );
392
393 setMaskBits( DeployedMask );
394}
395
396void ProximityMine::processTick( const Move* move )
397{

Callers

nothing calls this directly

Calls 4

getMatrixFromUpVectorFunction · 0.85
setPositionMethod · 0.45
setMethod · 0.45
setTransformMethod · 0.45

Tested by

no test coverage detected