I’m looking at the Unity car tutorial and there is something wrong with the skidmarks. It’s like they are having a hard time keeping up with the car.
Does anyone know how to fix their script so that it does update correctly? Normally, the next segment should stretch toward the tire, and then get set down.
That’s how the tutorial comes. It already uses late update.
I mean if the locations are coming in late, I have a math formula that puts the vector ahead, but this is way too random. Sometimes the trail is close to the tire and some times it’s too far away from the tire.
Edit: Ok, I finally found a good trail script that can handle high speeds:
It’s the tron trail example project.
It looks like I may have to get creative with the UV mapping. Could any expert show me how I can match the texture to the ground? It seems to map the texture across the entire span of the trail.
Maybe I could scroll the texture with the speed of the car, but that might look a little funny don’t you think?
When I needed to do this, I just added one frame of the vehicle’s velocity to the skidmark spawn position. e.g. Instead of using wheelHitInfo.point I might use wheelHitInfo.point + (rigidbody.velocity * Time.fixedDeltaTime).