How would i make a car in godot deform similar to a real car?

I would argue that you should make your own system over using Godot’s current softbody implementation. SoftBody3D does not implement the concept of plastic deformation which is the permanent deformation you’re looking for. Moreover, Godot Docs states:[1]

This doesn’t mean you need to create a complex system. Simulating the effect of plasticly deformed stiff materials, such as the metal on a car, can be done in a simple manner if you’re willing to compromise on the simulation’s degree of realism.

Proposed Method

  1. Create a copy of the vehicle’s mesh for deformation purposes (meshDef)
  2. When the body detects a collision, note the impact force (imp_for) and impact point (imp_pnt)
  3. Compute the deformation for vertices within a specific radius of the imp_pnt and modulate the degree of deformation with distance and scale by imp_for.
  4. Then apply the deformed mesh, meshDef, to the MeshInstance and accompanying collider of your vehicle.

Sidenote

The proposed method will create stretching artefacts as there is no method to preserve the surface area of the non-deformed mesh.
The proposed method is also nowhere close to BeamNG’s implementation which uses a component-based framework of springs and nodes to simulate volumetric deformation.
If you want to create a similar system, I would recommend looking at the documentation for BeamNG’s JBeam framework.

Additional Resources


  1. SoftBody3D — Godot Engine (stable) documentation in English ↩︎