Custom collision shapes

Being able to control the exact shape of the shapes used for detecting collision is important for a good experience. The auto-generated collision shapes may also not be sufficient for some more complex 3D models. For better performance, it can sometimes be better to use multiple simple shapes rather than one complex one. All of this can be accomplished by defining your own shapes as part of the 3D model before exporting it in your 3D modeling tool.

Defining collision shapes

In your 3D modeling tool, you can create meshes and give them a name with a special prefix which Hology Engine can use to understand that this mesh is meant for defining the object's collision shape and will also not be visible. You can have multiple collision shapes and they will be combined into a single composite collision shape in Hology.

Shape types

The different shapes supported are listed below with their object name prefix in brackets.

  • Sphere (USP_): A spherical shape. For collision detection is is the least computationally expensive shape.

  • Box (UBX_): A shape with 6 sides and 90 degree corners.

  • Convex hull (UCX_): A shape with no indents similar to a box or a sphere but can accommodate geometries that are a bit more complex.

  • Trimesh (UTM_): A shape that is made up of all the triangles in the mesh. This is suitable if you have complex geometry and it is important that the collisions are very precise. This is less performant compared to other shapes so if possible, try using multiple simpler shapes instead of a trimesh.

Last updated