- Home /
Problem With GUI Circle Thickness
Imagine you have an objective (let's say it's a ball) within a 3D world, and a GUI texture that draws a circle around the ball in order to highlight and guide you to it. As the camera moves farther away, the ball appears smaller and therefore so must the circle. As the camera moves closer, the ball appears larger and again, therefore so must the circle. This would appear to be a simple matter of scaling the texture, but after trying that I found it looks rather odd because the thickness of the circle is not preserved as it scales. How can I change the size of the circle without also changing the thickness? GUI textures have a border feature which solves this problem for rectangular objects, but it's not much help for GUI elements that have circular borders. Technically I could just generate a new texture every frame, but this is of course a highly inefficient solution. Any ideas would be greatly appreciated.
Answer by hav_ngs_ru · Dec 04, 2013 at 09:10 AM
maybe something like MipMap technique would help you. make several copies of your texture with different size (classicaly - full-size, half-size, quarter-size and so on), and each frame just select appropriate one based on current distance from ball to camera.