Damage Model

I updated the Blender file for the car to improve the hierarchy, parts, and pivot points for the car. I re-imported it into my project and spent some time adding the rigidbodies, colliders, and fixed joints to the parts. The colliders are mostly primitive boxes for performance reasons, but some objects, like the windows are convex mesh colliders since they are on a slant. The fixed joint break forces are configured at 2000 but I think I will have to stiffen that up a bit for release later, but at at the moment it caters for some good carnage, especially at pileups!

I duplicated the cars, two of which I left without a driver down the start/finish straight as collision targets and another three I duplicated with drivers and left the player controls enabled. I added a unique steering multiplier to the cars so when I steer the main car the other 3 cars will steer a bit less and possible also in another direction, just to make it look somewhat natural for the tests as if there were independent players.

To verify more in detail how the damage model works, I decided to reduce the simulation speed to 25%.  Since it's in slow motion I thought it would be suitable to add some of my calm piano music. No idea if that was a good choice or not. You decide =)

I decided to keep the video running after the initial pile up because at the slow motion speed it becomes quite easy to observe how the car physics behaves. I'm very pleased with how sliding of the car works and you can see that you can catch a power slide by steering into the skid. In the slow motion video, most of the slides are power slides but at one or two occasions I also dab the hand brake as I was running out of asphalt in the corner.

Oh, and a side note. Don't worry about the flag marshal - he is OK, never injured and he always gets up after he tumbles as you can see when the lap has been completed =)

I think I may keep the 150% time scale setting for this game - after more testing it feels quite fun to run at that pace for some more action. I just hope it'll work out in multiplayer which is what scares me the most. Here is what the car crashes look like at current natural game speed:

This view also shows the part separation and also the colliders inside Unity:

I hope you enjoy following along with the development of this game. Please feel free to add comments and let me know what you think and any ideas you may have!


Log in with itch.io to leave a comment.

can I get this car damage model or damage system?