Cesium for UE mouse click

I want to get the position of the scene where the mouse clicks, but the coordinates obtained after conversion are offset from the actual clicked position. How can I solve it
zuobiaojisuan

Hi @peijw,

Can you share more information about your setup?

  • It would be helpful to see an example (with screenshots) of where the expected location is and where the output location is.
  • Are you converting the location using any of the Cesium conversion functions (such as to longitude and latitude), or are you only using the ConvertMouseLocationToWorldSpace node?
  • It’s also hard to answer this question without a better idea of your scene. Are there any assets in your scene that could be blocking collision?

-Alex

I use my own camera, so I only use the ConvertMouseLocationToWorldSpace
I only click on the terrain and there is deviation
This is the position of mouse click and ray emission

Hi @peijw it looks like Convert Mouse Location To World Space can’t return a proper 3D position. You may need to do a line trace or similar down from the cursor to the terrain to find out where it’s actually over. This thread might be useful to you, it looks like they’re experiencing a similar problem.