How to implement World Space UI to Screen and then Raycast To Ground
I'm making a game where there is a ground 3d object (a box), a perspective camera with enforced aspect ratio, and a world space UI scaled and positioned to fit exactly to the screen (please See Screenshot).
I would like to calculate the exact point on the ground that (for example) cell {A,0} is pointing at. Each cell is a UI sprite. My current intended implementation is to:
Get Screen Position of {A,0}
Raycast from screen position to ground, on the vector screen position to {A,0}
However, I'm having trouble getting the correct numbers (probably because I'm using the wrong conversion functions. What's the correct way to do this, or is there an even easier implementation to get what I want?
Your answer
Follow this Question
Related Questions
Laser pointer style UI interaction in VR 2 Answers
Unity Button reacts even if Canvas is disabled 0 Answers
Block Raycast with Ui in Andoid 0 Answers