Fix collider issues with body parts

This commit is contained in:
karl committed 2020-02-01 11:16:15 +01:00
1 parent 929f5ec4d3
commit 214a10d794
1 file changed
+4 -3
+4 -3
View File
@@ -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