Jolt Generate Collision Component
The Jolt generate collision component automatically creates a static collision mesh from the render meshes produced by a spline mesh component on the same game object.
Because spline meshes are procedurally generated from a set of render mesh pieces, there is no single pre-authored collision asset that can be assigned by hand. This component solves that by mapping each render mesh piece to a corresponding Jolt collision mesh asset, then assembling the collision geometry to match the generated spline mesh exactly.
Setup
- Add a spline mesh component to a game object.
- Add a Jolt generate collision component to the same object.
- For each render mesh piece used by the spline mesh component, add an entry to the Mesh Mappings list:
- Render Mesh: The render mesh asset used in the spline mesh component.
- Collision Mesh: The corresponding Jolt collision mesh asset (triangle mesh).
- Set the Collision Layer to the appropriate collision layer.
Render mesh pieces that have no mapping entry will not produce any collision geometry.
Component Properties
- Mesh Mappings: List of render-mesh-to-collision-mesh pairs. Each entry maps one render mesh to one Jolt triangle collision mesh.
- Collision Layer: The collision layer assigned to the generated static actor.