Skip to content

SoftBody3D pinned points get displaced when reloading current scene #86308

Closed
@jirisvd

Description

@jirisvd

Tested versions

Reproducible in: 4.3.dev [2d0ee20], 4.2.1.stable, 4.1.3.stable, 4.0.4.stable

System information

Godot v4.2.1.stable - Windows 10.0.22621 - Vulkan (Forward+) - RX 7800 XT - i5-13600K

Issue description

When you have a SoftBody3D node with pinned points in your scene and you reload the scene using get_tree().reload_current_scene() or by loading a different scene and then loading back to the first scene, the pinned points become displaced in the reloaded scene and the following error is printed twice for each pinned point:

E 0:00:01:0421   get_global_transform: Condition "!is_inside_tree()" is true. Returning: Transform3D()
  <C++ Source>   scene/3d/node_3d.cpp:343 @ get_global_transform()

softbody_issue

This issue is similar to the problem reported in #54780, but the reproduction project in that issue is more complex and throws more errors, plus it's originally from Godot 3.4, so I'm creating this issue for the more straightforward case of simply having a SoftBody3D with pinned points and reloading current scene.

Steps to reproduce

  1. Open MRP and run the game
  2. Use A / D to rotate the cube and verify that the soft body has pinned points working properly
  3. Press Space to trigger get_tree().reload_current_scene()
  4. See that now the pinned points are clearly displaced and above mentioned errors were thrown

Minimal reproduction project (MRP)

MRP for 4.2: softbody_issue_4.2.zip
MRP for 4.0 and 4.1: softbody_issue_4.1.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions