diff --git a/Ingame/BodyParts/BodyPart.gd b/Ingame/BodyParts/BodyPart.gd index 6b634d7..316e6de 100644 --- a/Ingame/BodyParts/BodyPart.gd +++ b/Ingame/BodyParts/BodyPart.gd @@ -20,14 +20,15 @@ func _ready() -> void: func _process(delta: float) -> void: + # We do this here because we want the whole tree to really be done instancing if not setup_done: - var translation = physics_shape.to_global(physics_shape.translation) - physics_shape.translation = Vector3.ZERO + var translation = physics_shape.global_transform.basis * physics_shape.translation remove_child(physics_shape) base.add_child(physics_shape) - physics_shape.global_transform.origin = translation + physics_shape.translation = translation + setup_done = true