u-value track following


I've prototyped a more spline-like approach to track following.

Here (see video) a u value tracks % across the entire path and is used to lerp point-to-point.

Critically, compared to the previous prototype, we assume points are uniform (pixel) distances apart, which allows us to subtract a pixel amount (in this case, carriage length) from and obtain a second for the position of where the carriage should be.

This prototype is imperfect and I need to try it with sprites (since the rectangles here do not rotate) - but I think it is convincing enough for a first version of the track-following in the game.

Leave a comment

Log in with itch.io to leave a comment.