瀏覽代碼

Bugfix: Fixing positioning of the camera gizmo

BearishSun 8 年之前
父節點
當前提交
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);
         }
     }