I am attempting to convert euler angle rotations between Unity and Threejs. There are two main issues with this.
Problem 1:
Unity and Threejs have different coordinate systems
Unity:
Threejs
Problem 2:
Unity does euler math in the order ZXY whereas Threejs defaults to XYZ. I have found some formulas on the Threejs side for creating Euler angles using a different order of multiplication, but I would like to know the math behind this so I can go back and forth between the two systems. I am also not sure how the different coordinate systems plays into this conversion math.
EDIT 1
I found this stack overflow post about converting a Unity Quaternion to Threejs:
Convert Unity transforms to THREE.js rotations
However, I was not able to get this code to work for going the opposite direction of Threejs to Unity which is what I need.