Getting Longitude Latitude through mouse click in UE Blueprints

I am searching for a while to get Lon Lat through mouse click in unreal Engine. As I am trying to create a way point mechanism where i can store gps point by clicking and then move an actor on that path. Is there any function to get precise Lon Lat through mouse click in blueprint node on a round globe.

There’s no single function to do this, but it’s easy to do with a few Blueprints nodes. First you need to do a line trace into the scene based on the mouse position. The 06_Metadata level in the Cesium for Unreal Samples project does this in the level blueprint:

Then you need to break the Out Hit returned by the Line Trace By Channel node and convert the Location of the hit to Longitude / Latitude / Height:

As implied by the name of the result pin, the Longitude is first (in the X component) and Latitude is second (in Y).

1 Like

@Kevin_Ring thanks for the solution.