Merge pull request #107256 from smix8/avoidance2dcallback

Change `NavigationServer2D` avoidance callbacks from `Vector3` to `Vector2`
This commit is contained in:
Rémi Verschelde 2025-06-09 00:45:39 +02:00
commit 151db00f2c
No known key found for this signature in database
GPG key ID: C3336907360768E1
4 changed files with 16 additions and 17 deletions

View file

@ -111,9 +111,9 @@ void NavAgent2D::dispatch_avoidance_callback() {
return;
}
Vector3 new_velocity;
Vector2 new_velocity;
new_velocity = Vector3(rvo_agent.velocity_.x(), 0.0, rvo_agent.velocity_.y());
new_velocity = Vector2(rvo_agent.velocity_.x(), rvo_agent.velocity_.y());
if (clamp_speed) {
new_velocity = new_velocity.limit_length(max_speed);