How to rotate an item in 3d around the center using mouse movement?

Godot Version

4.4.1

What I’m trying to do

The player picked up an object. Pressing Tab locks the object in place and stops all rotation. Now the player can rotate with moving his mouse. Move the mouse to the right/left to rotate right/left. Move the mouse up/down to rotate up/down. Baspically like the Skyrim Loadingscreen thing or Sims Character creator.

This was already adressed once, but I can’t get it to work: How to do free 3d rotation around the center using mouse movement?

Questions

a) Any Idea how to do it?

Capture mouse motion event in _input(). The received event will have relative property which is a relative mouse motion in both axes since last frame. Rotate the 3d object around its x and y axes in proportion to that mouse relative motion along corresponding axes.

Thank you. This gives me the option to rotate in fixed directions.

The player picks up an object. It floats infront of them, like in R.E.P.O. but now the player can press a button, stops and rotate again. Regardles of how their or the items world position changed.

Is that possible? Is that just a bunch of math?

Update: I’ve scraped this idea, because of math.