Collision Area Partitioner
Last updated
Last updated
Collision Area Partitioner is used to predefine possible collision areas, find what vertices are inside each of the area and save it in a CollisionAreasDataSO scriptable object.
This component requires scriptable object to already be created. To create a new scriptable object, type the name in the "Collision Areas SO Name" field and click "Create New CollisionAreasDataSO" button. By default it will be saved to the "CustomVehicleController/VehicleController/VehicleParts/CollisionAreas", but you can change it in the "Package Settings" window.
Make sure the "Debug Gizmos" is set to True.
Make sure the Gizmos is enabled in the Scene View (last icon).
Give this collision area a name for easier identification. Set the Center, Height, Width and Length properties to cover the area that you are interested in, like the left side, hood, roof, etc.
Enter the isometric mode in the scene view (three lines icon in the top right).
After you are done, click the "Partition the Mesh into Collision Areas" button
The CollisionAreasDataSO scriptable object is ready to be assigned to the VehicleDamageController.
If you want to partition the mesh, you should cover as many areas as possible. All the vertices that don't belong to any collision area will not be deformed.