mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Change 2D avoidance callbacks from Vector3 to Vector2
Changes 2D avoidance callbacks from Vector3 to Vector2.
This commit is contained in:
parent
42c7f14422
commit
0ce53ffc69
4 changed files with 16 additions and 17 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue