Hello,
I’m trying to do a “local rotation” conversion to a Vector3 axis. What i’m trying to do is set a ConfigurableJoint.axis, to be aligned exactly as the rotation of one of my gameobject’s children.
so i get the child’s local rotation, and extract the axis from it, applying it to the configurable joint:
var angle = 0.0;
var axis = Vector3.zero;
mychild.transform.localRotation.ToAngleAxis(angle, axis);
myJoint.axis = axis;
the result is a Vector3(0.9,0.0,-0.4) but using it to set the configurableJoint.axis really doesn’t give me the direction it should…
any ideas why this is happening?
trying by hand some rotations, the joint axis seems to be right at (1,0,-1), for this particular example.
or is there any other more efficient way to get this rotation to a CJ axis?
thank you!