Added foveal FOV representation for POV cam
This commit is contained in:
@@ -13,6 +13,7 @@ public class FieldOfView : MonoBehaviour
|
||||
|
||||
public Transform eyeLeft;
|
||||
public Transform eyeRight;
|
||||
public Transform eyeCenter;
|
||||
|
||||
public LayerMask targetMask;
|
||||
public LayerMask obstacleMask;
|
||||
@@ -40,6 +41,7 @@ public class FieldOfView : MonoBehaviour
|
||||
private void LateUpdate()
|
||||
{
|
||||
Vector3 gazeDirection = ((eyeLeft.forward + eyeRight.forward) * 0.5f).normalized;
|
||||
eyeCenter.rotation = Quaternion.LookRotation(gazeDirection);
|
||||
float gazeAngle = AngleFromDir(gazeDirection, true);
|
||||
DrawFOV(transform.eulerAngles.y, periMesh, periAngle);
|
||||
DrawFOV(gazeAngle, foveaMesh, foveaAngle);
|
||||
|
||||
Reference in New Issue
Block a user