Line Renderer Keys don't work
Hi, I am creating a game and I am using a line renderer for a laser. I want the laser to bulb out in the front, then go back to its normal width. I tried to add keys in the AnimationCurve but it didn't seem to change anything. The only keys that worked were the first and last. Sorry if I am using the wrong terms, I am a beginner! By the way, I asked this question before but it is taking a long time for moderation. That is why I am posting this in the help room.
Answer by streeetwalker · Mar 25, 2020 at 03:14 PM
@gawynross, You need the [edit this is incorrect: same number of points] - you need more points in the lineRenderer than the number of line thickness keys. Create a lot of points and you'll get a smoother buldge.
Test by creating an empty object and add a lineRenderer component, add 3 points at 0,0,0 - 0,0,1 0,0,2 and then set the thickness keys on the curve.
Play around to see the effect of moving the keys left or right.
To make a laser that bulges at the start and grows toward a target will be an interesting challenge.
Thank you so much! I never would of though that you would have to add more positions.
Your answer
Follow this Question
Related Questions
Line Renderer how to move individual keys 0 Answers
How do I add points to a LineRenderer Width curve as I'm "drawing" the line? 0 Answers
How can I effectively generate a random idle animation? Unity generates ugly transitions. 0 Answers
Trying match Unity Animation Curve with Hermit Spline. Ger Weird behaviour.... 0 Answers
is my Raycast being reflected correctly and why is it giving me an infinite loop? 0 Answers