Fix snap to the ground to use scene graph query instead of physics only raycast

This commit is contained in:
Wojtek Figat
2021-08-12 13:59:30 +02:00
parent 98c43dba42
commit c3b9f61b9f
8 changed files with 92 additions and 11 deletions

View File

@@ -21,10 +21,12 @@ namespace FlaxEditor.Viewport
/// </summary>
/// <param name="task">The task.</param>
/// <param name="undo">The undo.</param>
public EditorGizmoViewport(SceneRenderTask task, Undo undo)
/// <param name="sceneGraphRoot">The scene graph root.</param>
public EditorGizmoViewport(SceneRenderTask task, Undo undo, SceneGraph.RootNode sceneGraphRoot)
: base(task, new FPSCamera(), true)
{
Undo = undo;
SceneGraphRoot = sceneGraphRoot;
SetUpdate(ref _update, OnUpdate);
}
@@ -73,6 +75,9 @@ namespace FlaxEditor.Viewport
/// <inheritdoc />
public Undo Undo { get; }
/// <inheritdoc />
public SceneGraph.RootNode SceneGraphRoot { get; }
/// <inheritdoc />
protected override bool IsControllingMouse => Gizmos.Active?.IsControllingMouse ?? false;