Is there a way to assign one collision shape to two different bodies?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By JTJonny
:warning: Old Version Published before Godot 3 was released.

Is there a way to assign one collision shape to two different bodies?

I have a node attached to my player (KinematicBody2D). I want to add collision from that attached node. I know how to move shapes in code, but I want the shapes to be controlled in the attached node.

Trying to make the question clearer:

I want a way to have one collision shape I can edit in game, which will then update two different kinematic bodies (or instances of a collision shape that keep the same transform).

:bust_in_silhouette: Reply From: thirite

If I understand correctly, what you want to do is save your collision shape( there is a button for it) and then instance it by the nodes that use it. You can instance a saved resource by hitting the + button in the node tree editor (the window on the left side of the screen).

Thanks for the answer. I want a way to have one collision shape I can edit in game, which will then update two different kinematic bodies (or instances of a collision shape that keep the same transform). I was able to solve my problem by updating the second collision shape ever time the first one changed.

JTJonny | 2016-05-18 03:58