How to set a new rotation method?

I want to set a new rotation method like in the video below.This rotation method is common in models in the construction industry.
normal (1.7 MB)

Simply put, the model only rotates along the X, Y, or Z axis, which means that the current mouse movement needs to be determined during rotation to determine which axis to rotate around.But I don’t know how to determine the amount of mouse movement.

Looking forward the answer,Thanks!

Hello @619944680,

Communicator has a BIM-specific operator feature which you can enable via the method setBimOrbitEnabled():

let op = hwv.operatorManager.getOperator(Communicator.OperatorId.Orbit);

This operator allows the building model to more easily remain “upright.” Should you need to further customize its behavior by writing your own operator, the TypeScript source code is available as part of the Communicator package. Please refer to HOOPS_Communicator_2023_SPXX_xx\web_viewer\typescript\operators\Camera\CameraNavigationOperator.ts


1 Like