Picking with Terrain provider.


In order to display the coordinate under my mouse position, I am using scene.camera.pickEllipsoid(movement.endPosition, ellipsoid);

But I display the elevation with a TerrainProvider.

Then I would be accurate to use a ray pick action with the Tile returned by my terrain provider.

How t do this ?


Hi Xav,

Just use scene.globe.pick instead of scene.camera.pickEllipsoid:

var ray = scene.camera.getPickRay(windowCoordinates);

var intersection = globe.pick(ray, scene);


Thanks it’s work

Should had this on the SandCastle exmaple .