# How to get coordinates by use world position and height

It’s a little hard to describe from the picture. But it’s common from a 3D perspective. For example, a distant point and a nearby point with height have the same coordinates.y on the screen when the camera has a certain Angle of tilt.
I tried to get Cartesian3 coordinates via screen coordinates (in the Mousemove event). I can get the blue dot. But what I want is to click on the red dot to get the coordinates of the green dot (the red dot is the same height as the blue dot and it’s a certain height above the green dot).

Is there a way to distinguish between the two cases?
PS:The dashline right side is some text. means there has some height

Hi, Please don’t get me wrong but It’s really hard to understand the exact requirement. Please elaborate more in detail. Try to share screenshot from different perspective to understand the dots positions.

• Regards

Here is the sandbox(Cesium Sandcastle).
The red dot is 1000 meters directly above the green dot.When move the camera, you’ll notice that the red dot is changing relative position to the other two dots.

When moved to a certain Angle, the red dot can completely obscure the blue dot

When I click red one:

So the question is, when I click on the red location on the map, how do I get the latitude and longitude of the green point with the height, as opposed to the blue point with the height zero

You want to get the location coordinates of green point whenever you click on red point and want to set green point height as similar to the blue point. Is this what you want to do?

Please let us know if it helps you or not.

• Regards

let’s make it simple. The core question is how could i drag to move a point(with height) to another position and keep it height.I implemented the point drag, but found that the new point height is 0

Ok now I understood that you want to drag entities without changing the height. You want to change longitude and latitude only.
I’ve re-modified the sandcastle example.

You can drag any entity by pressing and hold ALT button on keyboard and Left mouse button. Don’t just click on entity after pressing ALT button. You have to press and keep holding Alt and Left mouse button together to drag entity.

You can use your own logic if you don’t want to use ALT button.

• Regards

Thanks for you reply, normally this would work, but I found that when the camera was at an Angle to the map, the point moved up a little distance at the beginning of the drag.

And if the camera is parallel to the ground and the background of the point is sky, the coordinate picking fails

According to the current situation, I think it’s a good idea to use screen coordinates to capture and transform