Merge pull request #92438 from lawnjelly/fti_fix_visual_instance_identity

[3.x] Physics Interpolation - Fix `VisualInstance::set_instance_use_identit…
This commit is contained in:
lawnjelly 2024-05-28 11:16:23 +01:00 committed by GitHub
commit 1bfb788c4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -74,10 +74,10 @@ void VisualInstance::set_instance_use_identity_transform(bool p_enable) {
if (is_inside_tree()) { if (is_inside_tree()) {
if (p_enable) { if (p_enable) {
// want to make sure instance is using identity transform // want to make sure instance is using identity transform
VisualServer::get_singleton()->instance_set_transform(instance, get_global_transform()); VisualServer::get_singleton()->instance_set_transform(instance, Transform());
} else { } else {
// want to make sure instance is up to date // want to make sure instance is up to date
VisualServer::get_singleton()->instance_set_transform(instance, Transform()); VisualServer::get_singleton()->instance_set_transform(instance, get_global_transform());
} }
} }
} }