Merge pull request #78727 from rburing/really_velocity

Fix CharacterBody3D `get_position_delta()` and `get_real_velocity()`
This commit is contained in:
Rémi Verschelde 2023-06-27 13:09:50 +02:00 committed by GitHub
commit 1b3bf48526
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1780,7 +1780,7 @@ const Vector3 &CharacterBody3D::get_last_motion() const {
}
Vector3 CharacterBody3D::get_position_delta() const {
return get_transform().origin - previous_position;
return get_global_transform().origin - previous_position;
}
const Vector3 &CharacterBody3D::get_real_velocity() const {