官术网_书友最值得收藏!

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 in any way or else it will not work.
  • USP_MeshName: USP stands for Unreal Sphere and as the name says, it should be in the sphere shape. The number of segments of this sphere does not matter (although somewhere around 6-10 seems to be good) but you cannot move any vertices around.
  • UCX_MeshName: UCX stands for Unreal Convex and as the name says, it should be a convex shape and should not be hollow or dented. This is the most commonly used collision shape because basic shapes such as boxes and spheres can be generated right inside Unreal.

In the following screenshot, you can see the red wireframe object, which is what I created for the collision shape:

Unreal Engine 4 collision generator

Collision shapes for static meshes can be generated inside the static mesh editor. To open this editor, double-click on a static mesh asset in Content Browser and click on the Collision menu, which will then list all the options for Collision.

主站蜘蛛池模板: 攀枝花市| 萨嘎县| 资中县| 塘沽区| 晴隆县| 祁门县| 株洲市| 绍兴市| 渝中区| 信阳市| 安平县| 台南县| 乐平市| 饶河县| 科技| 册亨县| 扶沟县| 聊城市| 昭觉县| 瓮安县| 江城| 五台县| 繁峙县| 新安县| 宜兰县| 白朗县| 宁南县| 惠州市| 普安县| 绥阳县| 名山县| 措勤县| 炎陵县| 北流市| 罗源县| 开原市| 西丰县| 筠连县| 广丰县| 阜城县| 平阴县|