# What is the difference between scene.globe.pick position and camera.pickEllipsoid position?

I know the title is a little confusing, I will try to express it clear below.

While I was trying to get the altitude of a click position, I found two working snippet that both get me the altitude. However, there is slightly different between the two results.
Below are the snippet I used to get the value.

## Snippet 1
var ellipsoid = viewer.scene.globe.ellipsoid; var pickedObject = viewer.scene.pick(click.position);
var cartesian = viewer.camera.pickEllipsoid(click.position, ellipsoid); var cartographic = ellipsoid.cartesianToCartographic(cartesian);

var longitudeString = Cesium.Math.toDegrees(cartographic.longitude);
var latitudeString = Cesium.Math.toDegrees(cartographic.latitude);

## Snippet 2
var ray = viewer.camera.getPickRay(click.position);
var cartesian = viewer.scene.globe.pick(ray, viewer.scene);
var cartographic = Cesium.Ellipsoid.WGS84.cartesianToCartographic(cartesian);

var long2 = Cesium.Math.toDegrees(cartographic.longitude);
var lat2 = Cesium.Math.toDegrees(cartographic.latitude);

However, after applied these two on the same click position, the coordinates I got are slightly different, which caused the altitudes are different. Can anybody explain to me a little bit about this difference?
Thanks.

Hello,

camera.pickEllipsoid will return a position with height=0 regardless of the terrain. It queries the ellipsoid (which is Ellipsoid.WGS84 by default) for the position.

viewer.scene.globe.pick will send a ray from the camera to the click position and return the position of the first intersection with the globe mesh. This includes the height of the terrain (which may change depending on the level of the tile loaded).

You will probably want to use viewer.camera.pickEllipsoid if you don’t have terrain enabled and viewer.scene.globe.pick if you do.

Hope this helps!

-Hannah