checkInFoV correction

requested:
https://github.com/GarageGames/Torque3D/issues/1009
crosscheck vs 69838bdc8c/Engine/source/T3D/fps/guiShapeNameHud.cpp (L177-L240) upon which that was based.
This commit is contained in:
Azaezel 2014-12-05 05:00:09 -06:00
parent 97be060c72
commit 8ac10e42b0

View file

@ -703,7 +703,7 @@ bool AIPlayer::checkInFoV(GameBase* target, F32 camFov, bool _checkEnabled)
// projection and box test.
shapeDir.normalize();
F32 dot = mDot(shapeDir, camDir);
return (dot > camFov);
return (dot > mCos(camFov));
}
DefineEngineMethod(AIPlayer, checkInFoV, bool, (ShapeBase* obj, F32 fov, bool checkEnabled), (NULL, 45.0f, false),