- Home /
Question by
tmahoney · May 10, 2012 at 06:47 PM ·
jointsjointconnectedbody
How do you find a Joint from its connectedBody?
I have a bunch of GameObjects that may be connected by Joints. I need to find all the Joints that are attached to an object. If the Joint is a component of the GameObject, this is easy:
var joints : Joint[] = gameObject.GetComponents.<Joint>();
However, this gets nothing if the object is the connectedBody
of the Joint. How do I get all the Joints that connect to a GameObject if the GameObject is the connectedBody
, not the gameObject
?
Comment
Answer by RunSwimFly · May 22, 2012 at 10:32 AM
Did you come up with a solution to this in the end? I haven't been able to turn anything up on the net. The only thing I can think to do is to create or add to a list of incoming joints on the connected body at the time the joint is created.