diff --git a/manual/physics/colliders/collision-data.md b/manual/physics/colliders/collision-data.md index 2dcb5ec3..a885018b 100644 --- a/manual/physics/colliders/collision-data.md +++ b/manual/physics/colliders/collision-data.md @@ -25,6 +25,23 @@ Now open the asset (double-click on it) and assign the model to use for a collid | **Convex Flags** | The convex mesh generation flags. See [ConvexMeshGenerationFlags](https://docs.flaxengine.com/api/FlaxEngine.ConvexMeshGenerationFlags.html) to learn more. | | **Vertex Limit** | The convex mesh vertex limit. Use values in range [8;255]. | +### Collision data type +Flax allows you to generate a convex or a triangle mesh for your collision data. + +#### Convex +A convex mesh is a simplified representation of a 3D object in which all internal angles are less than 180 degrees. This simplification results in a mesh with a uniform shape, and it's particularly well-suited for certain collision scenarios. + +![Convex](media/convex.png) + +#### Triangle mesh +A triangle mesh is a more detailed representation of a 3D object, consisting of interconnected triangles. This mesh type is capable of accurately representing complex and concave shapes, making it valuable for accurate collisions. + +![Convex](media/triangle-mesh.png) + +As you can see, a triangle mesh offers much more granularity and better represents the mesh but it comes at a cost: +- More expensive both in terms of memory and calculations. +- **Cannot** be used with a Rigidbody. This means they can only be used to collide against them. + ## Create collision data from code Flax supports creating most of the asset types in Editor using C# scripts (with editor plugins). The same applies to the collision data asset. Here is an example code that bakes the asset: diff --git a/manual/physics/colliders/media/convex.png b/manual/physics/colliders/media/convex.png new file mode 100644 index 00000000..8d3e485b Binary files /dev/null and b/manual/physics/colliders/media/convex.png differ diff --git a/manual/physics/colliders/media/triangle-mesh.png b/manual/physics/colliders/media/triangle-mesh.png new file mode 100644 index 00000000..efac8519 Binary files /dev/null and b/manual/physics/colliders/media/triangle-mesh.png differ