Explorar o código

Merge pull request #1010 from Azaezel/eyesFront

checkInFoV correction
Daniel Buckmaster %!s(int64=10) %!d(string=hai) anos
pai
achega
6338b8cc82
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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),