Understanding how thickness scales for lines vs discs

Avatar
  • updated

Hello! I'm building some worldspace UI via shapes components. I'm having trouble getting my lines to scale in the same way as my discs, triangles, and squares despite matching settings between the two. The examples below are what I observe when scaling down lines and circles. In these situations, the scaling is in a parent component.

Observed behaviour: The lines become thicker as compared to to the circle's thickness.

Desired behaviour: The scaled shape remains geometrically similar to the unscaled one.

Lossy scale: 0.8

Image 802

Lossy scale: ~0.05

Image 800

Image 801

Image 804

What I've researched:

- Unlike this post my line coordinates are within [-100, 100].

- Freya's reply to this thread describes my situation tantalizingly... but not the situation of the op so there's no follow up

- These users never followed up, but it seems like the polyline scaling overhaul fixed it.

What I've tried

- Coordinate mode: makes the lines "get bigger" (in screen space) as scale goes down. Intended behaviour, but not what I want in this situation.

- Billboarding: Makes the circle larger for some reason, but not effect otherwise.

- Scaling the game objects holding the lines, rather than its parent: No effect.

- Manually decreasing line thickness as scale decreases: possible, but feels hacky and needlessly expensive.

- Updating: I've tried both shapes 4.3.1 and shapes 4.2.

Thanks!

Reporting a bug? please specify Unity version:
2023.2.3f1
Reporting a bug? please specify Shapes version:
4.3.1
Reporting a bug? please specify Render Pipeline:
Built-in render pipeline
Avatar
Freya Holmér creator

it works on my end - this is with the same settings, upper set is with coordinate scaling, bottom is with uniform scaling (1 vs 0.2 scale).


I suspect maybe you're not setting the scale to the same value on all three axes? make sure all of the xyz scales are set to the same value, if not there's all sorts of stuff that can go wrong

Image 805

Avatar
Cinnamon
Works like a charm, thanks so much! I was leaving the z-scale at 1 while adjusting the xy. Making sure xyz are all the same fixed it.