Camera rotation offset

Someone recently asked: Is it possible to offset the camera in the html canvas so that the scene center point is offset?

Answer: Yes, the Navigate operator’s default behavior includes the ability to rotate around a specific point using the middle mouse button. Move the mouse pointer over a surface, depress the middle mouse button and drag.

Alternatively, you can use the Orbit operator to explicitly set the rotation target using this API:

https://docs.techsoft3d.com/communicator/latest/build/api_ref/typedoc/classes/communicator.operator.cameraorbitoperator.html#setorbittarget

Here’s a little code that shows this working with our microengine sample dataset:

hwv.getOperatorManager().remove(Communicator.OperatorId.Navigate)
hwv.getOperatorManager().push(Communicator.OperatorId.Orbit)
hwv.getOperatorManager().getOperator(Communicator.OperatorId.Orbit).setOrbitTarget(new Communicator.Point3(0, 2,0 0))
hwv.getOperatorManager().getOperator(Communicator.OperatorId.Orbit).setOrbitFallbackMode(Communicator.OrbitFallbackMode.OrbitTarget)