Quantcast
Channel: Questions in topic: "parenting"
Viewing all articles
Browse latest Browse all 302

Joints in child objects.

$
0
0
Hi all, I've created a GameObject which contains my rigid body. Then, I created my GameObject which is to be my joint. I had to instantiate these separately for reasons I won't get into here. In other words, I have: -GameObject A (contains Rigid Body) -GameObject B (contains Joint) Now, I'd like to attach my joint to its parent object. Usually, I'd give game object A both the Rigid Body and the Joint - but, right now, they're separate. So, my idea was to make B a child of A. B.transform.parent = A.transform; Then, I would continue as normal. Well, when I do this, a second rigidbody seems to appear in A. This seems to be created automatically. This is not what I wanted, I wanted B's joint to be attached to A's rigidbody. Without this, the bodies of my kinematic chain are not connected, and it falls apart. Is there any way to do a "rigid body transplant," and get the behavior I want?

Viewing all articles
Browse latest Browse all 302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>