A mesh collider allows for making a 1:1 collider of the given <code>Mesh</code>.
{{Note|Too many polygons colliding with a single collider at once can cause immense frame rate drops. Make sure the geometry on a given mesh collider is not concentrated in a small spot or too dense to avoid this!|danger}}
|Mesh|{{RootFieldType|AssetRef`1|[[Type:Mesh|Mesh]]}}|TypeAdv5=true| The mesh to make a collision shape made of groups of polygons out of.
|Sidedness|MeshColliderSidedness| Front or back sided collisions.
|ActualSpeculativeMargin|{{RootFieldType|RawOutput`1|[[Type:Float|Float]]}}|TypeAdv7=true| Essentially the room for error on the collisions for this collider.
}}
== Sync Delegates ==
{{Table ComponentTriggers
|ConvexDecomposition:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true| Called when the create convex hull decomposition button is touched.
|ReplaceWithBox:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true| Called when the replace with box collider button is touched.
}}
}}
<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
General practice is to use mesh colliders very sparingly.
<!--T:4-->
<!--T:4-->
== Examples ==
== Examples ==
This can be used for more complex collisions like sprawling terrain or procedural meshes that have complex shapes.
A mesh collider allows for making a 1:1 collider of the given Mesh.
Too many polygons colliding with a single collider at once can cause immense frame rate drops. Make sure the geometry on a given mesh collider is not concentrated in a small spot or too dense to avoid this!