1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +00:00

Merge pull request #60822 from lawnjelly/fti_add_child_reset

This commit is contained in:
Rémi Verschelde
2022-06-03 14:56:19 +02:00
committed by GitHub
3 changed files with 38 additions and 0 deletions

View File

@@ -101,6 +101,15 @@ void VisualInstance::_notification(int p_what) {
if (!_is_using_identity_transform()) {
Transform gt = get_global_transform();
VisualServer::get_singleton()->instance_set_transform(instance, gt);
// For instance when first adding to the tree, when the previous transform is
// unset, to prevent streaking from the origin.
if (_is_physics_interpolation_reset_requested()) {
if (_is_vi_visible()) {
_notification(NOTIFICATION_RESET_PHYSICS_INTERPOLATION);
}
_set_physics_interpolation_reset_requested(false);
}
}
}
} break;