Bending body panels for a car?

Hello, i’m building a car game and I’d like to have some body panels bend when crashing, at least the bonnet and trunk lid.
Like so


I’ve rigged the bonnet and put a hinge joint between the bones. It works ok in Unity but it is always active and wobbling around, and causes much lag with many cars.

Is there a way to set a minimum force which is needed to turn a hinge joint? So the rigged bones would only rotate in crashes?
Or could the rigging armature be “frozen” and set active with enough force?

Or is there a better way for making a bending bonnet? If nothing else works I can make it warp only in first crash and then stay that way, Carmageddon 2 style but I’d prefer a better way.

You can try a test version of my current damage system here;
https://dl.dropboxusercontent.com/u/69315779/romutus/romutus.html
Arrows steer and thats about it :> There’s no reset button yet, you need to refresh to restart, sorry about that.

I’ve used a vertex damage system to warp panels in crashes but bonnets and such would require better damage. This version uses a rigged bonnet with hinge joints. I tried using the “Use spring” option and setting a high damper value but it only affects the rotation speed of the hinge.

Have you looked at something like MegaFiers?

https://www.assetstore.unity3d.com/#/content/644

Also… even with no textures that demo is kinda fun. :slight_smile:

Thanks :smile:
That could be useful in the future, bit expensive at the moment (this is my first ever Unity project). I think MF only affects animation and not physics or collisions tho?

I can do with only visual bending for the panels if there’s a way for that. But I’d prefer to make it with rigged objects.
As long as it’s not too cpu-intensive, I’m planning to have about 20-ish cars on the track at the same time with the same damage model (maybe slightly modified lighter for the AI cars).

This seems like a job for blend shapes. Unity - Manual: Mesh asset

These might be interesting to you guys:

a free mesh deformation asset-
http://forum.unity3d.com/threads/50214-NOW-WITH-SOURCE-Mesh-deformation-on-impact

and another similar thing (paid)-

Both have demo’s you can try out, to see how it works.

EDIT: oh btw I am pretty sure both newlife and Edy (the guys who made some of the more popular vehicle systems for unity - UnityCar / Edy’s Vehicle Physics) have used the free system with their systems, so you could try that one out while playing the demos available for those assets as well.

Thanks for the help :slight_smile: I need try out blend shapes, maybe that would work.
I’m actually using the Viviludi mesh deformation for other damaging parts of the car :smile:
I’ll experiment some more with that, maybe I can make a separate damage model for the bonnet.

EDIT: It worked! :smile:


I added a separate mesh deformation script on the bonnet and tweaked some values.
This will do fine for this project :3
EDIT#2: It works, but the effect is weird, panels turn into circular flat shapes :frowning:

But, if anyone has idea how to make “stiff” hinges that require some force to turn that would be useful for future projects

THIS IS RELY GOOD ONLY MORE cars and tracks that will be awesome

moe zyslak :eyes:

I tried to make a car damage system (leaving and bending body parts during crash), but I can’t. I examined the game you’re doing. How did you do that?
Thanks for your assist:)

Nice results here.
You can also use Impact Deformable, available on Unity Asset Store: Impact Deformable | Physics | Unity Asset Store