Display a fraction of a line

  • updated
  • Under Consideration

- I have line from point A to B

I think it would be nice to be have the line to span a percentage of that distance. I know I can do this with just a tiny bit of math, but i feel this i such a common function it should have its own property.

Reporting a bug? please specify Unity version:
Reporting a bug? please specify Shapes version:
Freya Holmér
  • Under Consideration

possibly - I've considered this for other shapes too, as in, it would be a "reveal" parameter you can use for polylines, arcs etc too, but this adds a lot of work. we'll see, maybe!

otherwise like you say, animating this yourself for the lines specifically is very straightforward
animatedEnd = Vector3.Lerp( start, end, reveal ) where reveal is a value from 0 to 1