Browse Source

checkInFoV correction
requested:
https://github.com/GarageGames/Torque3D/issues/1009
crosscheck vs https://github.com/GarageGames/Torque3D/blob/69838bdc8c9bc055b9b1ae76f42b0f28d2a33909/Engine/source/T3D/fps/guiShapeNameHud.cpp#L177-L240 upon which that was based.

Azaezel 10 năm trước cách đây
mục cha
commit
8ac10e42b0
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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),