Question by
StripeGuy · Nov 16, 2021 at 12:33 AM ·
linerenderercurveanimationcurveline renderer
How do I add points to a LineRenderer Width curve as I'm "drawing" the line?
I'm using the line renderer to create a "drawing" app, and now I'm trying to enable pen pressure with the width curve on the LineRenderer. The problem is that the "time" values (horizontal) of the AnimationCurve are normalized from 0 to 1, so I can't just add a value to the end of it every everytime a position is added. Unless there's a function I'm unaware of, the only solution I can think of is finding a way to shift all hundreds of previous values by an exact percentage as I'm drawing the line, and do this as positions are being added. This seems excessive.
I'm at a loss on what to do here.
Comment