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

NavigationAgent3D set_velocity() doesn't trigger "velocity_computed" signal callback #47337

Closed
smix8 opened this issue Mar 24, 2021 · 3 comments · Fixed by #48028
Closed

NavigationAgent3D set_velocity() doesn't trigger "velocity_computed" signal callback #47337

smix8 opened this issue Mar 24, 2021 · 3 comments · Fixed by #48028

Comments

@smix8
Copy link
Contributor

smix8 commented Mar 24, 2021

Godot version:
Godot v4.0.dev.custom_build
commit 4a1f2dc

OS/device including version:
Win 10 64x

Issue description:
After telling the NavigationAgent3D the movement velocity with set_velocity() function the "velocity_computed" signal never gets emitted with Callback from the NavigationServer3D after the calculation is supposed to be done. Tested with both Editor signal connection and GDScript 2.0 Callable connection.

Movement of NavigationAgent3D on Navmesh works so NavigationServer3D and NavigationAgent3D generally communicate just fine with each other and only the "save_velocity" calculation for avoidance is butchered.

Setup and script is the same as in official NavigationServer blogpost.
https://godotengine.org/article/navigation-server-godot-4-0

Steps to reproduce:
Create NavigationRegion3D with navmesh.
Add NavigationAgent3D and some NavigationObstacle3D.
Connect "velocity_computed" signal on NavigationAgent3D.
Set agent velocity vector3 on NavigationAgent3D.set_velocity()
"velocity_computed" signal never receives a callback from the NavigationServer / RVO

Minimal reproduction project:
NavigationAgent3DIssue.zip

@Calinou
Copy link
Member

Calinou commented Mar 24, 2021

cc @AndreaCatania

@Calinou Calinou added this to the 4.0 milestone Mar 24, 2021
@smix8
Copy link
Contributor Author

smix8 commented Apr 12, 2021

Updated with MRP for commit 4a1f2dc

@smix8
Copy link
Contributor Author

smix8 commented Apr 18, 2021

After eating distasteful spaghetti for hours I learned that required properties like agent or map RID are never set correctly and broken functions would silently eat away the brains of all NavigationAgent3D with collision avoidance (no wonder they all acted so dumb in testing). I will prepare a PR as soon as I find the best place to insert a fix.

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.

2 participants