Merge pull request #78280 from raulsntos/path-follow-3d-clamp

Clamp `PathFollow3D` progress when not looping
This commit is contained in:
Rémi Verschelde 2023-06-16 10:20:43 +02:00
commit c6d9139f16
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -361,6 +361,8 @@ void PathFollow3D::set_progress(real_t p_progress) {
if (!Math::is_zero_approx(p_progress) && Math::is_zero_approx(progress)) {
progress = path_length;
}
} else {
progress = CLAMP(progress, 0, path_length);
}
}