- Home /
Setting line renderer size to raycast hit length
I'm attempting to set the index 1 y value of the line renderer to the length of a raycast hit in a top down setting. The value does change as my character rotates and moves around but it is not the length of the raycast at all. The values change but the line renderer still passes through walls, objects, enemies ,etc. I must be missing a better way to achieve this so any help would be greatly appreciated.
Your answer
Follow this Question
Related Questions
RaycastHit2D to hit an enemy when player rotates. (Using keyboard input only) 2 Answers
Inconsistent Reflection/Ricochet of 2D Lines at Specific Angles via Raycasting and 2D Colliders 2 Answers
Unity 2D -Reflecting a linerenderer 2 Answers
Improve sorting-order change in 2D top-down 1 Answer
How to fix, that every clone changes color, if I shoot at only one clone? 0 Answers