Changes between Initial Version and Version 1 of CarDamage

2011-09-17 12:13:56 (10 years ago)



  • CarDamage

    v1 v1  
     1{{{ #!Markdown 
     3# CarDamage 
     5Performs the mesh deformation on impacts. Also deforms nodes (Transforms) and colliders. 
     7This script is typically located at the vehicle's root GameObject. 
     9__minForce__: minimum relative speed in m/s between the contact points required for detecting the contact as an impact. 
     11__multiplier__: a measure of the influence the relative velocity between the contact points has in the deformation. The bigger this value, the more deformation. Experiment with this property in order to get the desired result. 
     13__deformRadius__ (m): distance around the contact point affected by the deformation. The amount of deformation will be maximum at the contact point, then it will decay progressively to no deformation at the limit defined by this value. 
     15__deformNoise__ (m): amount of random deformation applied on each affected vertex of the mesh. This makes the mesh appear as broken. 
     17__deformNodeRadius__ (m): distance around the contact point at which the rotation of the Nodes (see _DeformNodes_ below) will also be affected (_deformRadius_ affects only the position of the Nodes). 
     19__maxDeform__ (m): maximum distance a vertex can be displaced from its original position due to deformation on impacts. 
     21__maxNoderotationStep__ (degrees): maximum rotation angle that can affect the rotation of the Nodes on a single impact. This value is applied on the three euler angles independently. 
     23__maxNodeRotation__ (degrees): maximum rotation angle that the Node's euler angles can be rotated from their original value. 
     25__bounceBackSpeed__: a measure of the speed at which the vertexes move towards their original positions when repairing the vehicle (function _DoBounce_). 
     27__bounceBackSleepCap__: a vertex is considered "repaired" when the distance to its original position is less than this value. Repairing (bounce) stops when all vertexes of the mesh are "repaired". 
     29__autoBounce__: the vehicle repairs the impact damage automatically. 
     31#### DeformMeshes 
     33References to the vehicle's meshes that can be affected by impacts. They produce the visual result of the impacts. 
     35#### DeformNodes 
     37Additional GameObjects of the vehicle ("Nodes") which Position and Rotation are affected by impacts. This is typically used for wheels and steering wheels. 
     39#### DeformColliders 
     41References of the vehicle's __mesh colliders__ that are affected by impacts. Deforming the collider keeps a coherence between the visible damage and the behavior of the vehicle on further impacts. 
     43The mesh colliders used at vehicles are usually __convex__ mesh colliders. Deforming a convex mesh collider will always result in a convex collider: Unity automatically calculates the convex bounding volume for the collider. The results are fairy good in most cases. Non-convex vehicles typically use two or more overlapping convex mesh colliders.