Open JohnTheCoolingFan opened 1 year ago
This was something I wanted for following camera paths at constant velocity. Definitely a good thing to have, in my opinion.
I also need a way to follow a defined cubic curve at constant velocity. Maybe I missed something but it seems that it is still not possible in Bevy 0.14.2.
What problem does this solve or what need does it fill?
Some curve types have a property that equally distanced interpolations are not resulting in equal length segments. But this is important when it's needed to move something along a curve at constant speed. For example, train along the tracks, or some animation.
What solution would you like?
Helper method on Cubic spline that returns points that are equally distanced from each other along the curve.
What alternative(s) have you considered?
There is a method (
iter_sample
) that accepts a arbitrary sampling function which might be used as described in this book about Bezier curves