From 2473bd223418a740cd20cf2bd23908e430a621b1 Mon Sep 17 00:00:00 2001 From: lawnjelly Date: Mon, 27 May 2024 18:37:40 +0100 Subject: [PATCH] Physics Interpolation - Fix `VisualInstance::set_instance_use_identity_transform()` The logic for updating the `VisualServer` with the transform was the wrong way around. --- scene/3d/visual_instance.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/3d/visual_instance.cpp b/scene/3d/visual_instance.cpp index da663cd8a..110ef0efe 100644 --- a/scene/3d/visual_instance.cpp +++ b/scene/3d/visual_instance.cpp @@ -77,10 +77,10 @@ void VisualInstance::set_instance_use_identity_transform(bool p_enable) { if (is_inside_tree()) { if (p_enable) { // want to make sure instance is using identity transform - RenderingServer::get_singleton()->instance_set_transform(instance, get_global_transform()); + RenderingServer::get_singleton()->instance_set_transform(instance, Transform()); } else { // want to make sure instance is up to date - RenderingServer::get_singleton()->instance_set_transform(instance, Transform()); + RenderingServer::get_singleton()->instance_set_transform(instance, get_global_transform()); } } }