mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-23 12:26:59 +01:00
Small fix.
This commit is contained in:
parent
087e57abc7
commit
6d8e5773cc
@ -86,7 +86,7 @@ void GSAIKinematicBody2DAgent::_apply_sliding_steering(const Vector3 &accel, con
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector2 velocity = GSAIUtils.to_vector2(linear_velocity + accel * delta).clamped(linear_speed_max);
|
Vector2 velocity = GSAIUtils.to_vector2(linear_velocity + accel * delta).limit_length(linear_speed_max);
|
||||||
|
|
||||||
if (apply_linear_drag) {
|
if (apply_linear_drag) {
|
||||||
velocity = velocity.linear_interpolate(Vector2.ZERO, linear_drag_percentage);
|
velocity = velocity.linear_interpolate(Vector2.ZERO, linear_drag_percentage);
|
||||||
|
Loading…
Reference in New Issue
Block a user