Creating collision meshes

You can create collision meshes and export them with your asset. Unreal Engine 4 provides a collision generator for static meshes but there are times when we have to create our own custom collision shapes especially if the mesh has an opening (such as doors or walls with window cutouts). In this section, we will see both options.

Tip

Collision shapes should always stay simple because it is much faster to calculate simple shapes.

Custom collision shapes

Collision meshes are identified by Unreal importer based on their names. There are three types of collision shapes that you can define. They are as follows:

  • UBX_MeshName: UBX stands for Unreal Box and as the name says, it should be in a box shape. You cannot move the vertices ...

Get Unreal Engine 4 Game Development Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.