mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
toEuler. n ot getforwardvector
This commit is contained in:
parent
2fe36a571b
commit
f00b8e1ae0
1 changed files with 3 additions and 3 deletions
|
|
@ -75,7 +75,7 @@ bool AIController::getAIMove(Move* movePtr)
|
||||||
MatrixF eye;
|
MatrixF eye;
|
||||||
sbo->getEyeTransform(&eye);
|
sbo->getEyeTransform(&eye);
|
||||||
Point3F location = eye.getPosition();
|
Point3F location = eye.getPosition();
|
||||||
Point3F rotation = sbo->getTransform().getForwardVector();
|
Point3F rotation = sbo->getTransform().toEuler();
|
||||||
|
|
||||||
#ifdef TORQUE_NAVIGATION_ENABLED
|
#ifdef TORQUE_NAVIGATION_ENABLED
|
||||||
if (sbo->getDamageState() == ShapeBase::Enabled)
|
if (sbo->getDamageState() == ShapeBase::Enabled)
|
||||||
|
|
@ -190,7 +190,7 @@ void AIControllerData::resolveYaw(AIController* obj, Point3F location, Move* mov
|
||||||
{
|
{
|
||||||
F32 xDiff = obj->mMovement.mAimLocation.x - location.x;
|
F32 xDiff = obj->mMovement.mAimLocation.x - location.x;
|
||||||
F32 yDiff = obj->mMovement.mAimLocation.y - location.y;
|
F32 yDiff = obj->mMovement.mAimLocation.y - location.y;
|
||||||
Point3F rotation = obj->getAIInfo()->mObj->getTransform().getForwardVector();
|
Point3F rotation = obj->getAIInfo()->mObj->getTransform().toEuler();
|
||||||
|
|
||||||
if (!mIsZero(xDiff) || !mIsZero(yDiff))
|
if (!mIsZero(xDiff) || !mIsZero(yDiff))
|
||||||
{
|
{
|
||||||
|
|
@ -234,7 +234,7 @@ void AIControllerData::resolveSpeed(AIController* obj, Point3F location, Move* m
|
||||||
{
|
{
|
||||||
F32 xDiff = obj->getNav()->mMoveDestination.x - location.x;
|
F32 xDiff = obj->getNav()->mMoveDestination.x - location.x;
|
||||||
F32 yDiff = obj->getNav()->mMoveDestination.y - location.y;
|
F32 yDiff = obj->getNav()->mMoveDestination.y - location.y;
|
||||||
Point3F rotation = obj->getAIInfo()->mObj->getTransform().getForwardVector();
|
Point3F rotation = obj->getAIInfo()->mObj->getTransform().toEuler();
|
||||||
|
|
||||||
// Check if we should mMove, or if we are 'close enough'
|
// Check if we should mMove, or if we are 'close enough'
|
||||||
if (mFabs(xDiff) < mMoveTolerance && mFabs(yDiff) < mMoveTolerance)
|
if (mFabs(xDiff) < mMoveTolerance && mFabs(yDiff) < mMoveTolerance)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue