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

Method setRenderPosition

Engine/source/T3D/player.cpp:5399–5424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5397
5398
5399void Player::setRenderPosition(const Point3F& pos, const Point3F& rot, F32 dt)
5400{
5401 MatrixF mat;
5402 if (isMounted()) {
5403 // Use transform from mounted object
5404 //MatrixF nmat,zrot;
5405 mMount.object->getRenderMountTransform( dt, mMount.node, mMount.xfm, &mat );
5406 //zrot.set(EulerF(0.0f, 0.0f, rot.z));
5407 //mat.mul(nmat,zrot);
5408 }
5409 else {
5410 EulerF orient(0.0f, 0.0f, rot.z);
5411
5412 mat.set(orient);
5413 mat.setColumn(3, pos);
5414
5415 if (inDeathAnim()) {
5416 F32 boxRad = (mDataBlock->boxSize.x * 0.5f);
5417 if (MatrixF * fallMat = mDeath.fallToGround(dt, pos, rot.z, boxRad))
5418 mat = * fallMat;
5419 }
5420 else
5421 mDeath.initFall();
5422 }
5423 Parent::setRenderTransform(mat);
5424}
5425
5426//----------------------------------------------------------------------------
5427

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