Line Renderer + Collider,size and position script.

Hi there,i need script that determines a proper position and size for the collider based on the LineRenderer’s start and end point.Please HELP!

Anyone???

LineRenderer

You have to SetPosition in code or it looks like there’s no way to know what the position is.

Collider
You can change the collider’s size and position in the collider itself or by scaling/moving its transform.

No,it can be done with code,i have laser like in portal 2 game,where line renderer always changes position and scale i need same think with collider,IT IS POSSIBLE WITH SCRIPT.

Is there anyone who can HELP MEEEEEE

BUMP!!!

I told you what you need to know to do it. You must be having some problem with implementing it, or you wouldn’t come back and ask for help. If you can post what you’ve tried we can help guide you towards a solution.

If on the other hand you burst into the room screaming and expecting complete, working scripts tailor-made for your situation, you’ll probably just be ignored.

Use , lineRenderer.SetVertexCount (4);
4 is an example of length.