So I am using the viewer api and I would like to get the 2d screen coordinates of a 3d location in the scene.
I am not finding anything in the docs, is there a way of getting this info?
I can’t seem to use the THREE js matrixWorld of the objects since they are always ‘null’
Do you use Viewer.onNodeTypeClicked? This callback doesn’t include such information. Maybe try adding your own mouseup, touchend event handlers, store the screen position passed by a web browser to these handlers, and then in onNodeTypeClicked use the stored values.
This does help me to get the 2d position once when I click.
But I also want when I’m moving around in the scene to get the updated screen position for that 3d position.
There is the Viewer.getCameraPosition() that I can use to get the camera position.
But is there a way to get the projection matrix as well from the camera?