UI - Screen Space - Overlay - is it possible to have it scale based on distance?

Hello,

I have a UI prefab which is set to track a moving game object using WorldToScreenPoint(). The render mode of the canvas is set to Screen Space - Overlay.

I want to keep it as Screen Space - Overlay, so it always renders on top of anything in the world and also to do some fancy detections if it goes off-screen…etc

Is it possible though to have the scale of the UI change as the object moves away from the camera, so it partly fakes a 3D feel?

Thanks!

Actually, the better way to do this is to make it a world space UI, and then have a separate camera draw the UI objects on top of everything.

That maintains legibility and also scales based on perspective and distance…etc