Use total rotation from #3758 in #3760

This commit is contained in:
Wojtek Figat
2026-03-12 11:06:42 +01:00
parent cb17bcd2ff
commit b5d841ffc9

View File

@@ -401,7 +401,7 @@ namespace FlaxEditor
var uiControlDelta = GetControlDelta(control, ref _mouseMovesPos, ref moveLocation);
// Transform delta to control local space
var rotation = control.Rotation * Mathf.DegreesToRadians; // TODO: use total parent rotation
var rotation = GetTotalRotation(control) * Mathf.DegreesToRadians;
var cos = Mathf.Cos(rotation);
var sin = Mathf.Sin(rotation);
var localDeltaX = uiControlDelta.X * cos + uiControlDelta.Y * sin;