From f18c46d687e8bfb1dd899fc0127f5c7e7a326fa3 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Sun, 11 Feb 2024 04:37:54 -0600 Subject: [PATCH] Fix exporting trigger shapes in GLTF --- .../gltf/extensions/physics/gltf_document_extension_physics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gltf/extensions/physics/gltf_document_extension_physics.cpp b/modules/gltf/extensions/physics/gltf_document_extension_physics.cpp index 37b8ae06346f..a9033de7aeac 100644 --- a/modules/gltf/extensions/physics/gltf_document_extension_physics.cpp +++ b/modules/gltf/extensions/physics/gltf_document_extension_physics.cpp @@ -360,7 +360,7 @@ void GLTFDocumentExtensionPhysics::convert_scene_node(Ref p_state, Re gltf_shape->set_mesh_index(_get_or_insert_mesh_in_state(p_state, importer_mesh)); } } - if (cast_to(_get_ancestor_collision_object(p_scene_node))) { + if (cast_to(_get_ancestor_collision_object(p_scene_node->get_parent()))) { p_gltf_node->set_additional_data(StringName("GLTFPhysicsTriggerShape"), gltf_shape); } else { p_gltf_node->set_additional_data(StringName("GLTFPhysicsColliderShape"), gltf_shape);