-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
When moving a NavigationRegion2D the NavigationServer2D does not update. #85545
Comments
Just tried using NavigationServer2D.region_set_transform() -Update: So I'm required to use both server.region_set_transform(new_transform) and region.position = new_position. This is still a lose of functionality from 4.1.1.stable to 4.2.stable. |
The NavigationRegion2D transform notification is currently broken. See pr #85258 that fixes it. The debug visuals are part of the node, so any change that is done on the server-only will not be shown with the debug. E.g. moving the region with the NavigationServer API will not move the debug. A lot of the debug in Godot is currently node-based and has the same issue because the node updates are usually one-way tickets to the server and not the other way. See proposal godotengine/godot-proposals#7208 that wants to change this. |
So can this be closed as duplicate of #85242, or does it also cover other issues? |
Yes it is basically a duplicate, that linked issue about the not updating edge connections has the same problem that the transform notification does not work for the NavigationRegion2D. |
Godot version
4.2.stable, 4.2.stable.mono
System information
Godot v4.2.stable.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated AMD Radeon RX 5700 XT (Advanced Micro Devices, Inc.; 31.0.22011.4008) - AMD Ryzen 5 5600X 6-Core Processor (12 Threads)
Issue description
According to the "Using NavigationRegions" documentation https://docs.godotengine.org/en/stable/tutorials/navigation/navigation_using_navigationregions.html
"While changing the transform of a NavigationRegion node does update the region position on the NavigationServer, changing the scale does not."
This is true in 4.1.1.stable
However it is not working in 4.2.stable
Using either a RemoteTransform Node or setting the transform of the region directly.
Does not update the NavigationServer.
I'm using specifically the .Net release of 4.1.1.stable and 4.2.stable
But my scripts are in GDscript, doubt that matters, but just in case.
Steps to reproduce
Create a scene with a NavigationRegion2D.
Add a NavigationPolygon
Add a script which moves the NavigationRegion2D using it's .position variable.
To see the lack of update connect NavigationServer2D.map_changed to any print function.
In 4.1.1 this will emit/print every physics frame in which the map changes.
In 4.2 this will emit/print once on the first frame.
Minimal reproduction project
In the minimal reproduction project you can use the arrow keys to move the NavigationRegion2D around the screen.
The console will print out when NavigationServer2D.map_changed is emitted.
NavigationRegionUpdateBug.zip
The text was updated successfully, but these errors were encountered: