Weren’t too happy about animating tracks with just a texture.
So far I found about 5 different types of tracks that can be installed on M113, I’m going to imitate specifically this one:

I want a higher level of detail for my project, so each tread have to be rendered as mesh:

What you see is only the central part of the tread, without rubber pad and pins which connect them to each other. Pins need to be done as a separate mesh as they have a different pivot and placed between tread pads.
The way it’s done right now is rather simple. I have a spline component which sets the path of the track in normal state, aka when tank is just resting on a flat terrain. As suspension starts to engage uneven surfaces I move points of the spline to follow wheels, automatically calculated tangents bend nicely bend spline.
The problem with this approach so far is that when spline points move, length of the spline starts to change which leads to shifting position of the tread meshes. So I need to somehow keep length of the spline around some predefined value.
One of the solutions to this is to place a spring on the idler (top wheel at the back) and compress it in proportion to (target spline length - current spline length). This means that if I link one of the spline points to idler, track should follow it and compress/decompress to keep it’s target length. Unfortunately, M113 doesn’t have a spring on the idler in real life
There are some tanks that could use that, but there are plenty which don’t rely on such setup. So I need some other solution. The only workaround I can think so far is to selectively scale tangents on spline points to make track path less curvy, but I don’t think it would be enough to compensate all the stretching that track gets even from a single wheel:
