Picking with Terrain provider.

Hi

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 ?

xav

Hi Xav,

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

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

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

Kevin

Thanks it’s work

Should had this on the SandCastle exmaple .