From 40fbd13c26c874caf2edc77341e8f91c64593832 Mon Sep 17 00:00:00 2001 From: AlvaroHG Date: Wed, 14 Aug 2024 15:50:18 -0700 Subject: [PATCH] Fixes --- unity/Assets/Scripts/PhysicsRemoteFPSAgentController.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/unity/Assets/Scripts/PhysicsRemoteFPSAgentController.cs b/unity/Assets/Scripts/PhysicsRemoteFPSAgentController.cs index a827d8200a..c5f73d8cd3 100644 --- a/unity/Assets/Scripts/PhysicsRemoteFPSAgentController.cs +++ b/unity/Assets/Scripts/PhysicsRemoteFPSAgentController.cs @@ -6115,7 +6115,9 @@ public void RotateUniverseAroundAgent(ServerAction action) { public void ChangeFOV(float fieldOfView, string camera = "") { if (fieldOfView > 0 && fieldOfView < 180) { if (string.IsNullOrEmpty(camera)) { - m_Camera.fieldOfView = fieldOfView; + agentManager.UpdateMainCamera( + fieldOfView: fieldOfView + ); actionFinished(true); } else { var cameraTuples = new List<(Camera camera, bool isThirdPartyCamera, int id)>() @@ -6143,7 +6145,9 @@ public void ChangeFOV(float fieldOfView, string camera = "") { fieldOfView: fieldOfView ); } else { - tuple.camera.fieldOfView = fieldOfView; + agentManager.UpdateMainCamera( + fieldOfView: fieldOfView + ); } } actionFinished(true);