i have a virtual hand model, and i wish to rotate the finger joint to perform a releasing action.
i have use code above to achieve to rotation.
However the TMetacarpal.transform.localRotation.y act weird. Sometime return positive value sometime return negative value.
The correct value should be negative value -0.3360 however sometime it return positive value 0.3360.
Anyone have any idea about it?
It is quite probable that your LOCAL axes are oriented differently from your GLOBAL axes for the finger transform.
easy fix (drawback is that this makes your routine model-dependent):
hard fix <= which I suggest only after the easy fix works, and only if necessary, so we'll get to it afterwards