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

Method advanceTime

Engine/source/T3D/item.cpp:1372–1397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1370}
1371
1372void Item::advanceTime(F32 dt)
1373{
1374 Parent::advanceTime(dt);
1375 if ( isMounted() )
1376 return;
1377
1378 if( mRotate )
1379 {
1380 F32 r = (dt / sRotationSpeed) * M_2PI;
1381 Point3F pos = mRenderObjToWorld.getPosition();
1382 MatrixF rotMatrix;
1383 if( mRotate )
1384 {
1385 rotMatrix.set( EulerF( 0.0, 0.0, r ) );
1386 }
1387 else
1388 {
1389 rotMatrix.set( EulerF( r * 0.5, 0.0, r ) );
1390 }
1391 MatrixF mat = mRenderObjToWorld;
1392 mat.setPosition( pos );
1393 mat.mul( rotMatrix );
1394 setRenderTransform(mat);
1395 }
1396
1397}

Callers 4

renderWorldMethod · 0.45
advancePositionMethod · 0.45
advancePositionMethod · 0.45
updateImageAnimationMethod · 0.45

Calls 5

advanceTimeFunction · 0.85
getPositionMethod · 0.45
setMethod · 0.45
setPositionMethod · 0.45
mulMethod · 0.45

Tested by

no test coverage detected