Selecting center of rotation

By default, the center of rotation for navigation is always the point that was clicked on.
Same with zoom.

Is there a way to remove this default behavior and assign a custom event (key press, or double-click) to set the center point manually?

Hi @Adrian_Onsen,

I believe the Camera.lookAt function is what you’re looking for. You can pass it the position you want the camera to center on and it will set that point as the center of rotation.

Hope this helps,

Thanks for the reply @sanjeetsuhag .

How does one decouple the default click to set Camera.lookAt behavior?

Viewer sets up a number of default ScreenSpaceEventHandlers. This SandCastle has examples of custom event handlers. You can see the list of events generated here. There is no “drag” so you have to track mouse-down / mouse-up / mouse-move yourself, if you’re going to reimplement drag-to-pan.