"CreateGreasedLine" always faces the camera, but I don't need it to do so

image

image

I am used to draw roads, so I need it to be tilted like the mesh.

Hi,
You didn’t provide the PG using greasedLines. Would be easier if you would kindly add it. :pray:
As for the answer, let me cc the creator @roland …Shouldn’t be all too long :smiley: Meanwhile, have a great day :sunglasses:

update

Hello guys!

From the docs:
GreasedLine is a special type of line which uses a regular mesh with triangles to display a line of any width. It incorporates custom shaders designed to ensure that the mesh always faces the camera resulting in consistent thickness from all perspectives.

I already thought about a non-camera-facing mode exactly for the same scenario, for roads :slight_smile: It should be quite easy to introduce an option called cameraFacing: boolean which could turn on/off the camera facing mode but there is a catch. You would also need to define in which direction to expand the mesh when applying widths for the line segments. Let me elaborate on this for a while and I’ll get back to you with a solution, hopefuly :rofl:

:vulcan_salute:

2 Likes

Hi!
Too much hassle to make the chages and IMHO it will not be a line anymore. I think you should go with a Shape, a Ribbon or with a custom mesh instead.

EDIT:

1 Like

I think “CreateGreasedLine” is already powerful, but it would be great if it could have a “cameraFacing” option, even if it means sacrificing some other features.

What? No :smiley:

But this is ideal for drawing roads:

1 Like

thx!
I’ll give it a try, but you’re amazing!

1 Like
2 Likes