Rotate model with mouse

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…

1 Like

for example?
model.spatial.getLocalRotation().lookAt( destination, up );

what in destination variable and up variable?

1 Like

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[3];
cam.getRotation().toAngles(angles); // we get the cam angles here
angles[0] = 0; // you don't want to rotate along the x-axis, so we set it to 0
angles[2] = 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
2 Likes

Work good.

1 Like