Skip to content
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

Missing Obstacle Avoidance Method #78062

Closed
ATryder opened this issue Jun 9, 2023 · 4 comments · Fixed by #78081
Closed

Missing Obstacle Avoidance Method #78062

ATryder opened this issue Jun 9, 2023 · 4 comments · Fixed by #78081

Comments

@ATryder
Copy link

ATryder commented Jun 9, 2023

Godot version

4.1 Beta-1

System information

Manjaro

Issue description

In order to use dynamic obstacles in NavigationServer the documentation states one must assign a radius, as opposed to vertecies, with a call to NavigationServer3D.obstacle_set_radius(obstacle_rid, radius), but that method does not exist.

Steps to reproduce

Open a new script and type NavigationServer3D.obstacle_set_radius()

Minimal reproduction project

N/A

@AThousandShips
Copy link
Member

AThousandShips commented Jun 9, 2023

Can you please link to the documentation where it says this? There's several navigation documentation pages and information, and I'm unable to find this statement

@ATryder
Copy link
Author

ATryder commented Jun 9, 2023

https://docs.godotengine.org/en/latest/tutorials/navigation/navigation_using_navigationobstacles.html

The procedure is described under the Dynamic Obstacles section and code snippet is under the Prodecural Obstacles section.

@AThousandShips
Copy link
Member

AThousandShips commented Jun 9, 2023

This method doesn't exist (any more) so the documentation is probably out of date, unsure, but I think it might be out of date, but in any case given the current code this might be more appropriate over here, where the documentation not related to classes is handled

CC @smix8

@smix8
Copy link
Contributor

smix8 commented Jun 9, 2023

For now you can use NavigationServer3D.agent_set_radius($NavigationObstacle3D.get_agent_rid(), radius).

The radius using part of the NavigationObstacle is actually a NavigationAgent RID. What happened was that during development the fake_agent that uses the radius was removed from the obstacle. Later, due to popular demand the fake_agent was re-added to the obstacle without re-adding all relevant agent_xyz API functions to the new obstacle_xyz API. So it is actually the function(s) that is now missing while the documentation is more or less "correct". Will prepare a patch to re-add with the next 4.1 beta.

@smix8 smix8 self-assigned this Jun 9, 2023
@akien-mga akien-mga added this to the 4.1 milestone Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants