- Home /
Keep the width of a mesh always the same PIXEL size
I have a mesh of a circle border (MeshRenderer + MeshFilter) whose width should always be e.g. 20 pixels - no matter how far my camera is away from it. So when i go far away with the camera, the mesh will grow relatively to the circle and fill it completely. I hope you can get it easily by the picture.
It is not important that the width of the mesh is everywhere exactly 20 pixels. It is also ok when the end of the circle that is nearer to the camera has a width of 25 and the farer end a width of 15 e.g. I'm wondering if there is any pleasable solution :)
Answer by Dustin27 · Apr 09, 2021 at 10:51 AM
Fixed my problem by adapting the inner points of the mesh each Update(). I use the outer points as base points and move them a camera-dependant factor along the normal vector into the inner (but maximum until it hits the opposite border of the polygon).
Your answer
Follow this Question
Related Questions
Plane is not rendered when look up 1 Answer
Orthographic Camera Size? 3 Answers
Texture on Unity Meshes 1 Answer
Common gameobject mesh size 1 Answer
How to load/save 'Chunks' near cam for mesh terrain? 0 Answers