Hi all, I have a simple scene with a few objects, lights, etc, and an
ArcRotateCamera that I can drag around to look at things from different angles. But really I want to pick one of the meshes at a time and rotate that, have other controls to switch the camera between targets, and just allow the camera controls for zooming.
Now I can do the first and trickiest part of that by watching pointermove events and creating a rotation from the accumulating X and Y movements of the mouse pointer, but this presents some issues: touch events seem to have a different scaling than mouse events, the rotation is not smoothed for me, and if I re-orient the camera through some other means then the rotation is wrong and must be transformed by the camera’s rotation matrix in some way I haven’t yet worked out how to do.
Is there a simple way to get all these niceties on a mesh: smoothing, harmonious touch events, accounting for the view orientation, etc?
With that done, what is the simplest way to leave the camera able to zoom, i.e. respond to pinch and scroll events, but without its other behaviours?