Add smooth viewport orientation movement to Direction Gizmo

#3857
This commit is contained in:
Wojtek Figat
2026-03-25 17:39:03 +01:00
parent 0ac5e85cd9
commit 0cbb2f0525
4 changed files with 5 additions and 6 deletions

View File

@@ -164,8 +164,7 @@ internal class DirectionGizmo : ContainerControl
AxisDirection.NegZ => Quaternion.Euler(0, 180, 0),
_ => Quaternion.Identity
};
_viewport.ViewOrientation = orientation;
_viewport.OrientViewport(ref orientation);
}
/// <summary>

View File

@@ -1223,7 +1223,7 @@ namespace FlaxEditor.Viewport
/// Orients the viewport.
/// </summary>
/// <param name="orientation">The orientation.</param>
protected void OrientViewport(Quaternion orientation)
public void OrientViewport(Quaternion orientation)
{
OrientViewport(ref orientation);
}
@@ -1232,7 +1232,7 @@ namespace FlaxEditor.Viewport
/// Orients the viewport.
/// </summary>
/// <param name="orientation">The orientation.</param>
protected virtual void OrientViewport(ref Quaternion orientation)
public virtual void OrientViewport(ref Quaternion orientation)
{
if (ViewportCamera is FPSCamera fpsCamera)
{

View File

@@ -654,7 +654,7 @@ namespace FlaxEditor.Viewport
}
/// <inheritdoc />
protected override void OrientViewport(ref Quaternion orientation)
public override void OrientViewport(ref Quaternion orientation)
{
if (TransformGizmo.SelectedParents.Count != 0)
FocusSelection(ref orientation);

View File

@@ -681,7 +681,7 @@ namespace FlaxEditor.Viewport
}
/// <inheritdoc />
protected override void OrientViewport(ref Quaternion orientation)
public override void OrientViewport(ref Quaternion orientation)
{
if (TransformGizmo.SelectedParents.Count != 0)
FocusSelection(ref orientation);