- Home /
How to transmit the correct rotation (quaternion) to an configurable joint?
Hi guys. I want to transmit a localRotation of a gameObject to the targetRotation of an configurable Joint.
This is the way I tried it:
private var NewRotation : Quaternion;
NewRotation = sourceGameObject.transform.localRotation;
targetGameObject.GetComponent(ConfigurableJoint).targetRotation = NewRotation;
It almost seams to work, but there is always at least one axis mirrored. I tried any thinkable combination with the Axis and Secondary axis value in the configurable joint input mask. What do I wrong ? - I quite desperated.
(You have to know I'm just started to learn scripting)
Answer by designico · Apr 29, 2013 at 10:06 PM
I finally found a solution :-) This nice guy released a script to fix this issue. Visit this thread: http://forum.unity3d.com/threads/8919-Quaternion-Wizardry-for-ConfigurableJoint
I just put that script into a javascript function, just because I even have less skills in CS than in JS. Now I'm able to sleep again :-)
How do you put "that script into a javascript function"? Could you clarify?
Your answer
Follow this Question
Related Questions
Using Configurable Joints to create Pinball Flippers? 3 Answers
ConfigurableJoint - angular positions (rotation) problem 1 Answer
Rotate towards target around axis with limits 0 Answers
How to fix this strange child 3D rotation? 0 Answers
configurable joint targetrotation: How to compute it 3 Answers