Skip to content

CameraControl tweak - orbit Camera#look when click-dragging on empty canvas in "orbit" mode #503

@xeolabs

Description

@xeolabs

When myViewer.cameraControl.navMode == "orbit" and we click-drag on empty space, then orbit us about Camera#look, instead of about Scene#center.

This change helps the following navigation use case.

When myViewer.cameraControl.navMode == "orbit", dollying moves Camera#eye and Camera#look forwards and backwards, in unison. Dollying is therefore able to move us all the way through a model, and then out the other side.

If we dolly through a model and pop out the other side, then being able to click and drag on the empty space in front of us, to orbit us about Camera#look, will allow us to turn around and face the model again.

The previous behaviour for click-dragging empty canvas, in which we orbit Scene#center by default, would be disorienting, because that center could be anywhere, resulting in objects whizzing past and disappearing as we orbit.

Demo: https://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_XKT_DoublePrecision_MAP

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions