aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/AISystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/system/AISystem.cpp')
-rw-r--r--src/crepe/system/AISystem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crepe/system/AISystem.cpp b/src/crepe/system/AISystem.cpp
index d231c7c..1d8ffb9 100644
--- a/src/crepe/system/AISystem.cpp
+++ b/src/crepe/system/AISystem.cpp
@@ -146,7 +146,7 @@ vec2 AISystem::arrive(const AI & ai, const Rigidbody & rigidbody,
}
float speed = distance / ai.arrive_deceleration;
- speed = std::min(speed, rigidbody.data.max_linear_velocity.length());
+ speed = std::min(speed, rigidbody.data.max_linear_velocity);
vec2 desired_velocity = to_target * (speed / distance);
return desired_velocity - rigidbody.data.linear_velocity;