Reputation: 2339
I am loading a default Columbus view and then on an event camera flies to some location A. Then on other event I want Camera to come back to the default view that was loaded on page load. I am trying to capture the camera coordinates on page load but not finding any suitable solution for it. How to get coordinates of camera loaded at default? and set those camera coordinates again on second event? Thanks in advance.
Upvotes: 1
Views: 359
Reputation: 12418
The default view is called the "home" view. To fly back there, just call:
viewer.scene.camera.flyHome();
If you prefer to skip the camera flight, and just instantly teleport there, set the duration to zero:
viewer.scene.camera.flyHome(0);
Upvotes: 1