Question by
RaytjeKnOfficial · May 11, 2017 at 10:51 AM ·
linedrawdrawline
How to draw a line between two objects.
I’m making a 3rd person shooter game. I’m having a crosshair and I want to constantly draw a line between the person and the cursor. The thing is, I don’t know how. Any suggestions?
Comment
Answer by RainierBarrett · Oct 24, 2017 at 07:53 PM
LineRenderer does exactly what you need. Just include a call to SetPosition() in the Update() step of the object you attach your line to, setting the positions to those of the person and cursor.