Depth adjusted line width

Is there a way to have a lines thickness be based on the distance from the camera?

Currently if I have a line created and zoom out the line thickness stays the same instead of reducing based on the distance from the camera.

Thank you for your time

Create a three dimensional shape (e.g. a cylinder) instead of a lineā€¦and make sure perspective is turned on.

Thank you for the information.

I ended up creating a custom mesh to solve the issue.