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 NavigationAgent3D stored y-axis velocity and make it optional #83705

Merged
merged 1 commit into from
Oct 21, 2023

Conversation

smix8
Copy link
Contributor

@smix8 smix8 commented Oct 20, 2023

Fixes NavigationAgent3D stored y-axis velocity and makes it optional.

Part of #83625 and similar issues.

The 2D avoidance runs on a flat plane so small uneven 3D geometry already causes very noticeable clipping. This property reapplies the y-axis velocity after the 2D avoidance step so it can help to mitigate that.

The problem from the linked (and other) issues was that users often do not set their velocity to zero when they stop their agent movement so this stored velocity gets reapplied every frame making the agent go up or down.

@smix8 smix8 added this to the 4.2 milestone Oct 20, 2023
@smix8 smix8 requested review from a team as code owners October 20, 2023 23:07
Fixes NavigationAgent3D stored y-axis velocity and makes it optional.
@smix8 smix8 force-pushed the agent_y_velocity_.4x branch from 59b0531 to 4771431 Compare October 20, 2023 23:11
@akien-mga akien-mga merged commit d2cd907 into godotengine:master Oct 21, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

Merged without seeing the above review comments, but would be worth doing those changes in a future PR.

@smix8 smix8 deleted the agent_y_velocity_.4x branch October 21, 2023 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants