- Home /
Show far away objects as a circle (big dot)
Hi, I have a huge space map with moving planets and ships. I'd like to view far away planets as seeable and clickable circles (or big dots). Far away ships should be seen as triangles. My approach would be have a circle sprite as a child of the planet game object and have it active when far away. But how to keep the circles size constant when zooming and it's orientation (perpendicular to the camera) when rotating the view. Is there a standard way of doing this in Unity? Thanks
Answer by Gustav2302 · Sep 04, 2021 at 12:42 PM
You should look into Lod Groups and Billboard Renderers
Thanks for the input, but it´s not exactly what I was looking for as with both, they keep shrinking when camera moves away. I came to the following solution: Use a Sphere primitive with a Mesh Component that's enabled when distance to the camera is higher than a defined number (in my case 200) and with transform.localScale = new Vector3(away*xFactor, away*yFactor, away*zFactor) / 200 I keep the sphere at constant size. With your input my next iteration would be to change the Sphere with a Billbord Render.
Answer by SunnyChow · Sep 07, 2021 at 05:08 AM
if i was me, i would do it in screen ui canvas, with Camera.WorldToScreenPoint(). it should easily avoid the zooming and orientation problem, and post-processing effect won't affect the circles/triangles