mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-05 21:40:31 +00:00
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:
parent
97be060c72
commit
8ac10e42b0
1 changed files with 1 additions and 1 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue