Hi, I am looking to enhance the viewer rotation behaviour to allow a user to lock the rotation axis on a specified cartesian3d position.
Essentially, I want to implement behaviour similar to the ‘set reference frame’ example in the following sandcastle using the lookAtTransform or lookAt method on the Camera controller, but rather than using click and drag to control the rotation, I would like to use the default CTRL + Left/right click behaviour.
Set Reference Frame - Camera Sandcastle
Is it possible to specify the cartesian3 position that I would like the rotate to axis on, while overriding the default CTRL + Left/Right Click behaviour? I can see that the rotate function can be called with a specified position and an angle, but I am unsure how to calculate the angle, assuming that would be a relatinpship between the current position of the cursor and the specified axis? Is there a known approach for implementing this behaviour?
Thanks for any assistance,