소스 검색

Merge pull request #1010 from Azaezel/eyesFront

checkInFoV correction
Daniel Buckmaster 10 년 전
부모
커밋
6338b8cc82
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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),