Hi,
ofNode internally uses quaternions rather than euler angles to represent rotations. So, when you pass in the vec3 containing euler angles in degrees it will get converted to a quaternion. Then when you want to retrieve euler angles from the quaternion you might not get the same numerical values as you had input because there are several different combinations of euler angles that end up in the same orientation. Thus, dont rely on the numerical values of the euler angles. If you want to check id recommend you to use something as the ofNode::getLookAtDir() direction, as in that case it will give you the same numerical values regardless of the “choice of euler angles”
A better approach is to use quaternions to set the orientation of an object.
One way to do that is to create a rotation that rotates an object relative to a starting vector.
So say you have a object lying on the x axis and you want it rotated 90 degrees to be upright, you would do this:
glm::quat myQuat = glm::rotation(glm::vec3(1, 0, 0), glm::vec3(0, -1, 0)); //rotate from lying down to upright. In this case -1 is up in Y.
myNode.setOrientation(myQuat);
or if you want to add a rotation to a current orientation:
auto quat = myNode.getOrientationQuat();
quat = glm::rotate(quat, ofDegToRad(45.0), glm::vec3(0, 0, 1)); //add a rotation of 45 degrees to the current orientation around the z axis
myNode.setOrientation(quat);
It takes a bit of getting used to but quaternions make this stuff a lot more precise and avoid the gimble lock issues.