Skip to content

Commit

Permalink
checkInFoV correction
Browse files Browse the repository at this point in the history
  • Loading branch information
Azaezel committed Dec 5, 2014
1 parent 97be060 commit 8ac10e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Engine/source/T3D/aiPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 8ac10e4

Please sign in to comment.