New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add NavigationAgent Path Debug Visualization #71543
Conversation
40115c7
to
556ea94
Compare
556ea94
to
1eb67dc
Compare
I'll be testing & reviewing this within the next 16h |
1eb67dc
to
40f6df3
Compare
857a9df
to
1282204
Compare
1282204
to
016151c
Compare
I removed the reliance on the |
016151c
to
3b28fee
Compare
Adds path debug visuals for NavigationAgent2D, NavigationAgent3D and NavigationServer.
3b28fee
to
0ab764e
Compare
Thanks! |
Adds path debug visuals for NavigationAgent2D, NavigationAgent3D and NavigationServer.
The NavigationAgent build-in path debug visuals are toggleable per agent in the inspector with
debug_enabled
property. Custom properties like path color or rasterized point size can be also used per agent instead of the global values whendebug_use_custom
is enabled.As with other navigation debugs the global values can be controlled in the ProjectSettings from ProjectSettings->Debug->Shapes.
While 2D always had an easy time just adding the navigation path points array to a Line2D node for display such an option did not exist for 3D and creating a debug mesh for paths was actually a ton of work and troublesome for beginners. Even for 2D using a node for display was troublesome as it messed with the SceneTree and child functions.
The debug visuals now use the RenderingServer directly, so no unexpected debug Nodes that appear in the SceneTree or RemoteSceneTree and mess up child functions and also no Node overhead. The rendering is updated only once when the agent path or properties change and not every frame to keep runtime performance cost low.