- Home /
Projecting 3D positions on Screen?
I have a helicopter and I want to program a radar system on it,that can detect enemies (it's easy until here) and then display an square around that enemy object on screen(using GUI).How can I transform enemy's 3D position into 2D position on screen?
Comment
Answer by robertbu · Jan 28, 2013 at 05:35 AM
You can use Camera.WorldToScreenPoint() to get the screen point. But your helicopter will changes size on the screen depending on it distance from the camera and it orientation, so if you want to display a square, you'll need to calculate the size of the rectangle as well as its position on the screen.
Your answer
Follow this Question
Related Questions
PasswordField help. 1 Answer
Button then instanitates gameobject 1 Answer
Creating GUI 1 Answer