- Home /
Question by
designico · Apr 26, 2013 at 09:35 AM ·
quaternionreset
How to reset a configurable joint quaternion?
At the beginning of my scene I need to reset (0,0,0,0) the quaternion value of the targetRotation. First I tried this:
function Start ()
{
JointSchulter.GetComponent(ConfigurableJoint).targetRotation = Quaternion.Inverse(transform.localRotation);
}
But this couldn't help me, so tried this one:
function Start ()
{ JointSchulter.GetComponent(ConfigurableJoint).targetRotation = Quaternion.Set(0.0, 0.0, 0.0, 0.0);
}
Here comes an error.
Comment
Don't you need to use Quaternion.identity ins$$anonymous$$d of Quaternion.Set(0.0, 0.0, 0.0, 0.0) ?
Yes Quaternion.identity seems to work wonders for orientating them to their default state.
Your answer
