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

Method setRenderPosition

Engine/source/T3D/player.cpp:5523–5548  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5521
5522
5523void Player::setRenderPosition(const Point3F& pos, const Point3F& rot, F32 dt)
5524{
5525 MatrixF mat;
5526 if (isMounted()) {
5527 // Use transform from mounted object
5528 //MatrixF nmat,zrot;
5529 mMount.object->getRenderMountTransform( dt, mMount.node, mMount.xfm, &mat );
5530 //zrot.set(EulerF(0.0f, 0.0f, rot.z));
5531 //mat.mul(nmat,zrot);
5532 }
5533 else {
5534 EulerF orient(0.0f, 0.0f, rot.z);
5535
5536 mat.set(orient);
5537 mat.setColumn(3, pos);
5538
5539 if (inDeathAnim()) {
5540 F32 boxRad = (mDataBlock->boxSize.x * 0.5f);
5541 if (MatrixF * fallMat = mDeath.fallToGround(dt, pos, rot.z, boxRad))
5542 mat = * fallMat;
5543 }
5544 else
5545 mDeath.initFall();
5546 }
5547 Parent::setRenderTransform(mat);
5548}
5549
5550//----------------------------------------------------------------------------
5551

Callers

nothing calls this directly

Calls 5

setColumnMethod · 0.80
fallToGroundMethod · 0.80
initFallMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected