Cleanup 5

This commit is contained in:
W2.Wizard
2021-02-21 11:50:30 +01:00
parent ee76440477
commit 694b20148d
30 changed files with 93 additions and 103 deletions

View File

@@ -46,8 +46,7 @@ namespace FlaxEditor.Gizmo
// Transform ray into local space of the gizmo
Ray localRay;
Matrix invGizmoWorld;
Matrix.Invert(ref _gizmoWorld, out invGizmoWorld);
Matrix.Invert(ref _gizmoWorld, out Matrix invGizmoWorld);
Vector3.TransformNormal(ref ray.Direction, ref invGizmoWorld, out localRay.Direction);
Vector3.Transform(ref ray.Position, ref invGizmoWorld, out localRay.Position);

View File

@@ -157,9 +157,8 @@ namespace FlaxEditor.Gizmo
_screenScale = vLength.Length / GizmoScaleFactor * gizmoSize;
Matrix.Scaling(_screenScale, out _screenScaleMatrix);
Matrix rotation;
Quaternion orientation = GetSelectedObject(0).Orientation;
Matrix.RotationQuaternion(ref orientation, out rotation);
Matrix.RotationQuaternion(ref orientation, out Matrix rotation);
_localForward = rotation.Forward;
_localUp = rotation.Up;