Browse Source

Merge pull request #1010 from Azaezel/eyesFront

checkInFoV correction
Daniel Buckmaster 10 years ago
parent
commit
6338b8cc82
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Engine/source/T3D/aiPlayer.cpp

+ 1 - 1
Engine/source/T3D/aiPlayer.cpp

@@ -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),