-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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 colliding with walls when rounding corners and avoiding collisions #60354
Comments
@xix-xeaon could you please provide MRP? |
Without a minimal reproduction project here are my guesses what is wrong here with navigation or expectations. The navigationmesh is baked with the The RVO avoidance does not consider navmesh bounds or level geometry. This is a known, real issue. Shortcuts are encountered if the target_desired_distance is too large for the baked navmesh settings. The path itself is usually far more detailed when baked with default settings. Agents skip multiple pathindex on each physic tick and With current 3.5 NavigationAgent The Also there is a limit of 1 update for an agent each physics frame. Multiple calls to |
Can be closed due to no MRP and response and this is clearly not a bug but a setup issue explained above. The desired distance is set way to high which creates all these mentioned problems and that the avoidance does not follow navmesh is documented. |
Godot version
v3.5.beta4.official [b6968ab]
System information
Linux
Issue description
The NavigationAgent takes "shortcuts" and travels outside of the navigation mesh when it turns around things. This then causes it to collide with static geometry. It's especially problematic with corners of walls but it also happens with round things like trees. This also happens when it tries to avoid colliding with dynamic obstacles.
The issue can be mitigated by reducing target_desired_distance, but it also causes the NavigationAgent to get stuck (around 0.2 it seems) and will only give it's current position as the next_location. I don't necessarily want such robotic movements either. It also doesn't help for collision avoidance. NavigationAgents frequently run out of the navigation mesh and thus into walls in order to "avoid" collisions.
Basically, the NavigationAgent shouldn't leave the navigation mesh.
Steps to reproduce
The partially transparent red enemy is seeking the green player. Yellow is the next_location. Even though the enemy only has a 0.5 radius the navigation here is baked with 0.9. As you can see, the enemy is well outside the navigation mesh and about to collide with the corner of the gray cube.
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: