- Home /
Setting opposing target movement of configurable joints
I have 2 configurable joints that rotates only in x-axis in the opposite direction. I had a look at this but I am not certain how to capture only the X axis value when the rotation is expressed as Quaternion.
Think of it as 2 platforms ----O---- ----O----
, O is the pivot, that must rotate in opposite direction by using targetRotation
My proposed algorithm is as follows:
Get self initial rotation
Get target initial rotation
Find target current rotation
Find the difference of target's angle in x
Apply the difference in current joint as a negative value
Any pointers how to obtain the x rotation value from the configurable joint and apply it to current joint?
EDIT: I figured out the first one by using Transform.localEulerAngles
Answer by ikelaiah · Jun 06, 2013 at 06:40 AM
Solved the last step by using ConfigurableExtension.cs and use it as the following
SetTargetRotational(myJoint, Quaternion.Euler(angleNeeded, 0, 0), myJointInitialRotation);
Done! My system is working neatly. Thanks to mstevenson for his script.
Your answer

Follow this Question
Related Questions
How to reset a configurable joint quaternion? 0 Answers
ConfigurableJoint - angular positions (rotation) problem 1 Answer
How to transmit the correct rotation (quaternion) to an configurable joint? 1 Answer
How to fix this strange child 3D rotation? 0 Answers
configurable joint targetrotation: How to compute it 3 Answers