It’s a really nice project I like the instanced meshes for tracks, it looks so much better than just using animated materials. I’ve been working on a new movement component concept which would model the suspension better than the current PhysX implementation of NWheeled vehicles (I dislike ray traced wheel collisions there). My approach for spline is a bit different, I create it procedurally based on wheel location and then put it in 2 arrays to apply force and animation.
I don’t know if you fixed it by now but in your project I was getting the track to “slide” over the wheels after driving a few meters and stopping. It looked like some variable precision issue so I tried to fix it by saving only the remainder to the track var.
Replaced this (in animate treads function):
with this:
I’m having a small problem with my implementation and maybe you know what is the cause of it and how to fix it - when the tank reaches a certain speed, the physical simulation becomes unbalanced (also some precision issue?) and the suspension is bumping wheels on a flat surface. It still drives ok but visually it’s not as good as your implementation (rock solid at all speeds). I could try an further disconnect the visual wheels from simulated wheels, make them work on some sort of traces, but I want a better solution than that.
In the end of the video you can see the wheels starting to bounce at high speed: