- Home /
Problem is not reproducible or outdated
I have a GUI element that highlights an onscreen object with a circle. This circle needs to scale according to the object's distance from the camera in order to compensate for perspective, but the thickness of the circle needs to stay the same.
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.
Unfortunately long questions are closed. Please post your question again with a short title like "problem with circle thickness". Thanks.
Follow this Question
Related Questions
Problem With GUI Circle Thickness 1 Answer
Problem With GUI Circle Thickness 0 Answers
How to draw gui without border? 1 Answer
GUI box texture resizes itself 1 Answer
GUI.Button Texture Problem - Simple? 2 Answers