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

Method getMuzzleVector

Engine/source/T3D/shapeImage.cpp:1796–1814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1794}
1795
1796void ShapeBase::getMuzzleVector(U32 imageSlot,VectorF* vec)
1797{
1798 MatrixF mat;
1799 getMuzzleTransform(imageSlot,&mat);
1800
1801 GameConnection * gc = getControllingClient();
1802 if (gc && !gc->isAIControlled())
1803 {
1804 MountedImage& image = mMountedImageList[imageSlot];
1805
1806 bool fp = gc->isFirstPerson();
1807 if ((fp && image.dataBlock->correctMuzzleVector) ||
1808 (!fp && image.dataBlock->correctMuzzleVectorTP))
1809 if (getCorrectedAim(mat, vec))
1810 return;
1811 }
1812
1813 mat.getColumn(1,vec);
1814}
1815
1816void ShapeBase::getMuzzlePoint(U32 imageSlot,Point3F* pos)
1817{

Callers

nothing calls this directly

Calls 3

getColumnMethod · 0.80
isAIControlledMethod · 0.45
isFirstPersonMethod · 0.45

Tested by

no test coverage detected