User Tools


Damage Handler

DamageHandler inspector.

DamageHandler deforms the meshes on the vehicle (skinned meshes are not supported due to performance reasons).

  • Damage depends on deceleration at the moment of impact meaning that the faster the vehicle goes and the faster it stops on collision the more damage vehicle will take.
  • As the vehicle gets damaged more and more engine power will reduce, some randomness will be added to the engine sound and if the crash happened near the wheel (all the wheel meshes need to be tagged as “Wheel”) wheel will start steering in a random direction degrading the handling of the vehicle. There is also a wheel wobble effect added.
  • Mesh deformation that is the product of crashing is queue based. This means that only limited number of meshes will be deformed per frame. This value can be adjusted by changing the Deformation Vertices Per Frame field. Higher value will result in deformation being completed in less frames while lower value will stretch the deformation over the higher number of frames – and will also cause less frame dropping. It is best to adjust this value to as high as it is possible without causing frame drops. This will depend on the device the final game will run on.
  • Deformation Radius, Deformation Strength and Deformation Randomness all affect how the mesh will be deformed – how far the vertex can be moved from the original position, how much it will be moved for the given deceleration and how random the final result will be. Setting randomness to 0 will cause final mesh to be smooth and setting randomness to a high value will result in noisy looking mesh.
  • Deceleration Threshold is the minimum deceleration value needed for collision to be registered by DamageHandler.