Canvas (Screen space - camera) to World Point in scene

Thank you so much for the reply. I read the ScreenToWorldPoint Unity docs again but it’s still not working for me. What I’m trying to do is almost exactly like page I found, but using Screen Space - Camera instead of Canvas Overlay. https://www.robotmonkeybrain.com/convert-unity-ui-screen-space-position-to-world-position/

Per your suggestion I changed to using the main camera to calculate the target to this:

theUIImageTargetPositionInWorldSpace = Camera.main.ScreenToWorldPoint(UIImage.rectTransform.transform.position);

I also created a temp Vector3 for UIImage.rectTransform.transform.position and change the z to various numbers but didn’t see any difference.

When the player collects one of the game objects (circles in above example) they move to the lower left corner of the screen (viewport) an not to the UIImage location in the HUD. Thank you again for any other suggestions.

  • Jeff