Fix CharacterBody3D get_position_delta()
Calculate the difference of global positions. This also fixes get_real_velocity().
This commit is contained in:
parent
1f9e540f14
commit
104da478a8
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue