godotengine / godot-demo-projects

Demonstration and Template Projects
https://godotengine.org
MIT License
5.99k stars 1.65k forks source link

NavigationServer example #772

Open dirkk0 opened 2 years ago

dirkk0 commented 2 years ago

Which demo project is affected:

https://github.com/godotengine/godot-demo-projects/tree/master/3d/navmesh

Description: The existing Navmesh demo uses the Navigation node, which will be deprecated. I created a minimal example using the new NavigationServer with NavigationAgent here: https://github.com/dirkk0/godot-navigationserver-example

It may need some tweaking due to overshooting, but it works.

smix8 commented 2 years ago

There are 2 open prs for reworking the navigation demos for 2D and 3D. The 3D with just NavigationServer usage and the 2D with basic NavigationAgent usage. None of the demos uses or is for avoidance as the current avoidance is broken so no point in showing a broken feature. https://github.com/godotengine/godot-demo-projects/pull/766 https://github.com/godotengine/godot-demo-projects/pull/765

This demo here has issues, like using the set_target_location every physics frame (resets the entire path and makes agents dance in place in bad situations) or showing signal callback for avoidance without showing the correct use of the avoidance. While I think there is place for a RigidBody or avoidance using demo I don't think it should be added as a demo like this. As mentioned I did not try to add a demo for avoidance until the avoidance starts to work properly in Godot.

dirkk0 commented 2 years ago

Got it. Do you want me to rework the demo? According to your comment, I guess I should rather close this issue?

smix8 commented 2 years ago

I think it would be good to have a demo with RigidBody or for all agent types cause they require slightly different NavigationAgent scripts to function properly. I think a single demo with the different agent types e.g. Node3D, CharacterBody3D and RigidBody3D would be good and the same for 2D. If the open prs could be merged the existing demos could be extended in this direction. This issue here could stay open to track this.