Fix collider issues with body parts

This commit is contained in:
karl 2020-02-01 11:16:15 +01:00
parent 929f5ec4d3
commit 214a10d794

View File

@ -20,14 +20,15 @@ func _ready() -> void:
func _process(delta: float) -> 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: if not setup_done:
var translation = physics_shape.to_global(physics_shape.translation) var translation = physics_shape.global_transform.basis * physics_shape.translation
physics_shape.translation = Vector3.ZERO
remove_child(physics_shape) remove_child(physics_shape)
base.add_child(physics_shape) base.add_child(physics_shape)
physics_shape.global_transform.origin = translation physics_shape.translation = translation
setup_done = true setup_done = true