- Home /
Relationship of WorldPoint, ScreenPoint, and ViewportPoint
Hi guys, I have some questions to ask you.
I understand the concept of WorldPoint, ScreenPoint, and ViewportPoint (will write as WP, SP, and VP from now). Unity has great converting function as WorldToViewportPoint, WorldToScreenPoint. At this point, I became curious on the calculation of how it basically works.
For example, my Target Object is located at (-9.29, 3.11, 2.27). the Camera is located at (2.89, 0.998, -10.062).
By using conversion function above, result shows VP = (0.837, 0.568, 13.906) SP = (1269.349, 493.995, 13.90631) // Screen size is 1024*768
I found few different 4x4 Matrices (CameratoWorld, WorldtoCamera, Projection). So here's my question. By using these matrices and points, how can I calcaulte(convert) WP to VP? or is there any other factors that I would need to consider through the process? If you let me know the relationship equation, it will be perfect!
Thanks.
Your answer
![](https://koobas.hobune.stream/wayback/20220612075222im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
WorldToViewportPoint and ViewportToWorldPoint math 2 Answers
undrestanding WorldToScreenPoint and ViewportToWorldPoint 1 Answer
Projection of viewport on plane 2 Answers
Camera Relative Screen Pixel-coordinates 0 Answers
Onscreen objective pointer 1 Answer