Просмотр исходного кода

Bugfix: Fixing positioning of the camera gizmo

BearishSun 8 лет назад
Родитель
Сommit
e181c3fb84
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      Source/MBansheeEditor/Windows/Scene/Gizmos/CameraGizmo.cs

+ 2 - 2
Source/MBansheeEditor/Windows/Scene/Gizmos/CameraGizmo.cs

@@ -23,9 +23,9 @@ namespace BansheeEditor
             SceneObject so = camera.SceneObject;
 
             Gizmos.Color = Color.Yellow;
-            Gizmos.Transform = Matrix4.TRS(Vector3.Zero, Quaternion.LookRotation(so.Rotation.Forward, so.Rotation.Up), Vector3.One);
+            Gizmos.Transform = Matrix4.TRS(so.Position, Quaternion.LookRotation(so.Rotation.Forward, so.Rotation.Up), Vector3.One);
 
-            Gizmos.DrawFrustum(so.Position, camera.AspectRatio, camera.FieldOfView, camera.NearClipPlane,
+            Gizmos.DrawFrustum(Vector3.Zero, camera.AspectRatio, camera.FieldOfView, camera.NearClipPlane,
                 camera.FarClipPlane);
         }
     }