Hey everyone,
I have a sphere with three cylinders attached. I want each other these to be able to move in the y and z axis. So I have three config joint components attached to the sphere with each cylinder a connected body. This works fine only using the inspector. How do I access each config joint through code though? All I need to is to control angular velocity through code.
I have tried…
GameObject cyl_br_2;
cyl_br_2 = GameObject.Find(“Cyl_BR_2”);
cyl_br_2.GetComponent();
cyl_br_2.targetAngularVelocity.z += .1;
and…
ConfigurableJoint configJoint_1 = new ConfigurableJoint();
configJoint_1.targetAngularVelocity.z-= .1;
since I can’t rename the config joint component and the cylinder itself doesn’t have the component on it, how do I control all three config joint components on the sphere individually?
Thanks