Currently in my code, I have implemented rotation restrictions around a specific axis using the following snippet:
if (obj.rotation.x > -0.5) {
// execute rotation
}
Initially, this setup worked perfectly. However, things took a turn when I introduced rotations around a different axis, leading to discrepancies between the object's local and global orientations.
I am aware that I can adjust the object's local rotation using obj.rotateX(rads)
, but how can I retrieve the current local rotation?
Any assistance or guidance on this matter would be greatly appreciated.