Quantcast
Channel: Answers by "ransomink"
Viewing all articles
Browse latest Browse all 80

Answer by ransomink

$
0
0
You can distinguish between multiple components by using GetComponents. HingeJoint[] hingeJoints; void Awake() { hingeJoints = GetComponents(); } They will be placed in order from top-to-bottom. If the first hinge joint is the left arm you'll use `hingeJoints[0] ` and `hingeJoint[1] ` for the right arm. - Alternatively, you can reference them for easier access, like so: HingeJoint[] hingeJoints; HingeJoint leftArm; HingeJoint rightArm; void Awake() { hingeJoints = GetComponents(); leftArm = hingeJoint[0]; rightArm = hingeJoint[1]; }

Viewing all articles
Browse latest Browse all 80

Trending Articles



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