Draw line / circle in space

Hi, can you point me to the right direction? How to draw lines / shapes to 3D space like on this screenshot?

  1. lines are not going thinner in distance.
  2. lines are hidden behind some actors.

i was thinking about drawing to HUD or someting similar, but don’t know how to make some parts hidden based on the 3D scene…

776b6e341b68571377f434c4bad415a49593c5a8.jpeg

Trying to do the same thing. Anyone got ideas?