Change 2D avoidance callbacks from Vector3 to Vector2

Changes 2D avoidance callbacks from Vector3 to Vector2.
This commit is contained in:
smix8 2025-06-07 13:42:51 +02:00
parent 42c7f14422
commit 0ce53ffc69
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);