Browse Source

Initialize the transform for static camera-components properly

Signed-off-by: Karl Haubenwallner <[email protected]>
Karl Haubenwallner 2 years ago
parent
commit
0fb82a2e99
1 changed files with 4 additions and 1 deletions
  1. 4 1
      Gems/Camera/Code/Source/CameraComponentController.cpp

+ 4 - 1
Gems/Camera/Code/Source/CameraComponentController.cpp

@@ -7,6 +7,7 @@
  */
 
 #include "CameraComponentController.h"
+#include "AzCore/Component/TransformBus.h"
 #include "CameraViewRegistrationBus.h"
 
 #include <Atom/RPI.Public/Pass/PassFilter.h>
@@ -260,7 +261,9 @@ namespace Camera
             m_atomCameraViewGroup->Activate();
         }
 
-        UpdateCamera();
+        AZ::Transform local, world;
+        AZ::TransformBus::Event(entityId, &AZ::TransformBus::Events::GetLocalAndWorld, local, world);
+        OnTransformChanged(local, world);
 
         CameraRequestBus::Handler::BusConnect(m_entityId);
         AZ::TransformNotificationBus::Handler::BusConnect(m_entityId);