mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
commit
6338b8cc82
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.
|
// projection and box test.
|
||||||
shapeDir.normalize();
|
shapeDir.normalize();
|
||||||
F32 dot = mDot(shapeDir, camDir);
|
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),
|
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