-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
NavigationAgent ignores NavigationObstacle #76670
Comments
Does this happen if you don't set the target position every frame? You're not supposed to set it constantly as it recomputes the path
|
You also set a very high velocity when the distance is high, I suggest normalizing it |
Resetting the path every I do not think that this is the main or only problem as the current avoidance resets every frame anyway so it lacks consistence in velocity as well. If you can try testing with pr #69988 that fixes most of those issues. Also lowering the |
I moved the target position to |
So I had time to test the project now. While using a NavigationObstacle for something static is in general not recommended it is not the main issue. The issue is that ... a) The agent has a radius of 80 pixel but the NavigationAgent2D only has a radius of 10 pixel so it thinks it can move around the obstacle radius at that smaller size but gets stuck on physics collision. b) NavigationObstacle2D c) Since the avoidance will push the agent away from the ideal path it is also required to increase |
In version 4.1 it works much better, but in 4.0.2 these settings did not give any result. Anyway, thanks a lot for the help |
Closing per @smix8's comment, as this will be resolved in 4.0.3. |
Godot version
4.0.2.stable.official
System information
Windows 10, NVIDIA GeForce GTX 1660 SUPER, Vulkan
Issue description
NavigationtArget doesn't find a workaround and tries to go through NavigationObstacle as if it doesn't exist. Avoidance enabled
= true. All settings by default. The problem is reproduced in both 2d and 3d
Steps to reproduce
Minimal reproduction project
Test.zip
The text was updated successfully, but these errors were encountered: