mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
commit
fd7f8e5c8c
2 changed files with 25 additions and 0 deletions
|
|
@ -293,6 +293,30 @@ void AIPlayer::clearAim()
|
||||||
mAimOffset = Point3F(0.0f, 0.0f, 0.0f);
|
mAimOffset = Point3F(0.0f, 0.0f, 0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the correct aim for the bot to the target
|
||||||
|
*/
|
||||||
|
void AIPlayer::getMuzzleVector(U32 imageSlot,VectorF* vec)
|
||||||
|
{
|
||||||
|
MatrixF mat;
|
||||||
|
getMuzzleTransform(imageSlot,&mat);
|
||||||
|
|
||||||
|
MountedImage& image = mMountedImageList[imageSlot];
|
||||||
|
|
||||||
|
if (image.dataBlock->correctMuzzleVector)
|
||||||
|
{
|
||||||
|
disableHeadZCalc();
|
||||||
|
if (getCorrectedAim(mat, vec))
|
||||||
|
{
|
||||||
|
enableHeadZCalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
enableHeadZCalc();
|
||||||
|
|
||||||
|
}
|
||||||
|
mat.getColumn(1,vec);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the state of a movement trigger.
|
* Set the state of a movement trigger.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -170,6 +170,7 @@ public:
|
||||||
void setAimLocation( const Point3F &location );
|
void setAimLocation( const Point3F &location );
|
||||||
Point3F getAimLocation() const { return mAimLocation; }
|
Point3F getAimLocation() const { return mAimLocation; }
|
||||||
void clearAim();
|
void clearAim();
|
||||||
|
void AIPlayer::getMuzzleVector(U32 imageSlot,VectorF* vec);
|
||||||
bool checkInLos(GameBase* target = NULL, bool _useMuzzle = false, bool _checkEnabled = false);
|
bool checkInLos(GameBase* target = NULL, bool _useMuzzle = false, bool _checkEnabled = false);
|
||||||
bool checkInFoV(GameBase* target = NULL, F32 camFov = 45.0f, bool _checkEnabled = false);
|
bool checkInFoV(GameBase* target = NULL, F32 camFov = 45.0f, bool _checkEnabled = false);
|
||||||
F32 getTargetDistance(GameBase* target, bool _checkEnabled);
|
F32 getTargetDistance(GameBase* target, bool _checkEnabled);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue