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

Fix broken NavigationAgent3D collision avoidance callbacks #48028

Merged

Conversation

smix8
Copy link
Contributor

@smix8 smix8 commented Apr 19, 2021

Fixes #47337
Fixes #39692

Fix broken NavigationAgent3D collision avoidance callbacks.

Collision avoidance is broken and this is only a mini pr in advance cause it is important to make it testable again for larger fixes.

The callbacks are responsible for the safe_velocity signal received by the agents. The dispatched callbacks by the RVO agent would all fail silently if the NavigationAgent3D was not registered on a navigation map before calling the agent_set_callback function.

Now all agents are placed on the default navigation map for the agents parent node so they work by default and can be customized later by the user. This pr also exposes the NavigationAgent3D.get_rid() function for scripting cause the agent RID is required by many NavigationServer3D queries, e.g. to change agent map or create new callbacks after changes.

@smix8 smix8 requested a review from a team as a code owner April 19, 2021 21:39
Fix broken NavigationAgent3D collision avoidance callback
Copy link
Contributor

@AndreaCatania AndreaCatania left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice thanks!!

@smix8
Copy link
Contributor Author

smix8 commented Apr 22, 2021

@akien-mga

@akien-mga akien-mga merged commit a3fbc0b into godotengine:master Apr 23, 2021
@akien-mga
Copy link
Member

Thanks!

@smix8 smix8 deleted the issue_47337_broken_navagent3d_callback branch April 23, 2021 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants