godot icon indicating copy to clipboard operation
godot copied to clipboard

Improve NavigationObstacle3D editor tooling

Open smix8 opened this issue 1 year ago • 1 comments

Improves NavigationObstacle3D editing options inside the editor.

This PR fixes editing bugs that resulted in the obstacle vertices being lost easily with a misclick. It also adds missing editing functionality and some convenience features to the NavigationObstacle3D editor plugin. E.g. it adds vertex editing to the NavigationObstacle3D, adds new toolbar options e.g. to flip vertices, and improves debug visuals.

resolves https://github.com/godotengine/godot/issues/91797 (AABB visuals were nonsense and distracting and are removed)

obstacle_edit

The editor toolbar when a NavigationObstacle3D is selected has new modes and actions:

obstacle_toolbar

In order from left to right:

  • Add Mode Adds new vertex at left mouse clicked positions, also splits when clicked on existing edges.
  • Edit Mode Allows to move existing vertices safely around without adding or deleting them.
  • Delete Mode Deletes a vertex when left mouse clicked.
  • Flip Action Changes the winding of the vertices to control if agents are pushed in or out by the obstacle
  • Clear Action Clears the entire vertices after a confirm prompt.

obstacle_edit

Also adds UndoRedo to all edits and actions.

Moves obstacle editor plugin from core plugin folder to navigation module plugins folder.

smix8 avatar Jun 11 '24 21:06 smix8

I think this PR is perfect for general testing in 4.4 dev3/4, local testing did not show any problems

JekSun97 avatar Sep 23 '24 20:09 JekSun97

Maybe 4.4 dev5 will be a good time for general testing 😅

JekSun97 avatar Nov 10 '24 19:11 JekSun97

Thanks!

Repiteo avatar Nov 12 '24 15:11 Repiteo