Using simpler Mesh Colliders

Similarly, the mesh assigned to a Mesh Collider does not necessarily need to match the graphical representation of the same object (Unity simply picks it as the default). This allows us to assign a simpler mesh to the Mesh Collider's mesh property, which is different from the one we use for its graphical representation.

The following screenshot shows an example of a sophisticated graphical mesh that has been given a much more simplified mesh for its Mesh Collider:

Simplifying the rendered mesh into convex shapes with lower polygon counts in this way will significantly reduce the overhead needed to determine bounding volume overlaps with other colliders. Depending on how well the original object is estimated, there should be minimal noticeable gameplay differences, especially in the case of this ax, which we expect to be moving quickly as creatures swing it during attacks, making it unlikely that players will notice the difference between the two meshes as colliders. In fact, the simplified mesh is much less likely to be missed by discrete collision detection and is preferable for that reason.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.128.79.88