How can I transform Window Coordinate(Cartesian2) to WGS84 (world Cartesian3) coordinates?
Hello,
Please see our picking demo: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Picking.html&label=All
You can use
var cartesain3Position = viewer.camera.pickEllipsoid(cartesian2ClickPosition);
``
to get the Cartesian3 position on the ellipsoid where you clicked. I think it will return undefined if you click in space.
Best,
Hannah
Thank you for your reply!
Because I want to achieve a measurement height function, so I need to get the
Cartesian3 position anywhere, including clicks in space. Is there a function similar
to that of OpenGL gluUnProject?
You’ll have to implement your own algorithm for clicking in space. We don’t have a calculation for that because there are infinitely many different points to which that mouse position could point to in 3D space.
-Hannah