Skip to content

Commit

Permalink
Merge pull request #1010 from Azaezel/eyesFront
Browse files Browse the repository at this point in the history
checkInFoV correction
  • Loading branch information
crabmusket committed Dec 7, 2014
2 parents 2dd23e4 + 8ac10e4 commit 6338b8c
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 6338b8c

Please sign in to comment.