- Home /
Question by
Yangrui-Guo · Jul 21, 2016 at 08:43 AM ·
camerauitextaugmented-reality
How to make UI elements same size regardless of distance
Hello,
I'm trying to make a point of interest app using unity. It resembles the monocle app of Yelp, which displays info of nearby places on a screen. My method is to convert the gps coords to unity coords, then place UI elements at these coords. I also set the canvas to World Space. However in my preview the text elements becomes too small to read. How can I keep the size of the text always same regardless of distance?
image.png
(193.9 kB)
Comment
Answer by Arkaid · Jul 21, 2016 at 08:49 AM
Just draw them on screen space.
Project the 3D world coordinate in 2D screen space using Camera.WorldToScreenPoint
Draw your 2D UI items on those coordinates.