Hello, I am trying to implement a custom ArcRotateCameraPointersInput
to behave like Google Maps in both desktop/laptop browser and mobile device. Namely, with a mouse:
- Primary (usually left) click and drag pans the camera (moves it’s
target
… or more accurately updates the camera’s_target
since using thetarget
setter appears to maintain the camera’sposition
and change itsbeta
in the process) - Secondary (usually right) click and drag rotates the camera around it’s current target (updates the camera’s alpha and beta to keep the pointer “over” a fixed point on the ground plane)
… and with touches:
- Single-touch and move pans the camera (as with primary click & drag)
- Two-touches and move (together) “tilts” the camera (updating its
beta
to keep the center of the two touches “over” a fixed line perpendicular to the camera’s currentalpha
on the ground plane) - Two-touches that pinch or spread zooms the camera out or in respectively (updating its
radius
… e.g.useNaturalPinchZoom
) - Two-touches that move around one another rotate the camera (updating its
alpha
)
I and some of my colleagues were able to get pretty far with a fully custom ICameraInput<ArcRotateCamera>
implementation which you can see in this playground, but the targeting goes kinda wild when the pointer input jitters, and it was suggested by @Prodigal that maybe there’s a way to adjust settings on the built-in ArcRotateCameraPointersInput
(and that maybe @PolygonalSun would be a good person to tag).