Change 2D avoidance callbacks from Vector3 to Vector2
Changes 2D avoidance callbacks from Vector3 to Vector2.
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user