Is it possible to rotate the object / mesh not the camera?
Just to clarify my question, I want to rotate a mesh with the mouse. Not rotate the scene.
Use a pointer event to react to mouse moves and in the function just update the mesh.rotation
property (you should find the info you need in pointerInfo.event
).
I am having problems finding documentation on pointerInfo.event, am I going at it in the wrong way maby?
I found this but it looks super advanced for what I am looking for.
https://www.babylonjs-playground.com/#11ERZN#2
I think pointerInfo.event
is the regular HTML event, so you should easily find documentation about it (for eg: Element: mousemove event - Web APIs | MDN).
Note that scene.pointerX
and scene.pointerY
always give you the current position of the mouse.
Thanks for the help, but I can´t get it right.
What about this: