use lookAt method for this. but no clue what you are doing, to talk to you is like talking with robot. We suggest something and you make a different proposal. So I fear nobody is really able to help you, maybe a huge language barrier…
model.spatial.getLocalRotation().lookAt( destination, up );
what in destination variable and up variable?
Hey @nnpa, you are maybe thinking way to complicated.
The following is out of my head. This might be an approach how to get what you want:
float angles = new float; cam.getRotation().toAngles(angles); // we get the cam angles here angles = 0; // you don't want to rotate along the x-axis, so we set it to 0 angles = 0; // you don't want to rotate along the z-axis, so we set it to 0 player.setLocalRotation(player.getLocalRotation().fromAngles(angles)); // apply new player rot