Help with getting world coordinates to photo capture pixels

My goal is taking a picture (using the PhotoCapture class) of game objects and getting the world coordinates of the game objects and translate it to pixel coordinates on the image output from the PhotoCapture class.
I tried using “camera.WorldToScreenPoint()” but this function gives coordinates that are not accurate.
I also tried using “ScreenCapture.CaptureScreenshot(filePath)” in order to use “camera.WorldToScreenPoint()” but I get error on “ScreenCapture.CaptureScreenshot()” function.

I am a newbie. Any help would really help a lot!

Thanks!

Are you trying to take a picture that aligns with the world?

This thread is probably a good place to start: Holographic Photo Blending with PhotoCapture - Unity Engine - Unity Discussions

1 Like

Thanks for the reply!

My goal is to create at least 4 points using game objects then crop the picture inside the area of the points as a result, disregarding their difference in distance from the camera.

Thanks for the reply!

I see, Yes! I think it has some similarities with what I want to achieve. I will take a closer look on the link you posted.