Skip to content

Collisions

JammieDodgerr edited this page Mar 5, 2023 · 14 revisions

Note: Since version 1.0.0.32 complex collision has become a lot more reliable. However, it's still best practice to use simple collision for reliable physics and better performance.

Resources

UE4 Documentation: FBX Static Mesh Pipeline

Youtube Video: UE4 - Tutorial - Custom Collisions!

Modelling Techniques (Blender)

Solidify Top Faces

This is a quick and effective way to create collsions, here we are selecting the top faces of our obstacles, separating each face and solidifying/extruding them downwards.

  1. Go to Orthographic Top View (Numpad 5, Numpad 7).
  2. Make sure X-ray mode is disabled.
  3. In Edit mode select all top faces with box select (B, click and drag).
    • Once you have your selection you are free to move the camera and re-enable Xray mode.
  4. Duplicate your selection (Shift D + Right Click) and separate (P - Selection) so that they are a new Object.
  5. Parent the new Object to your obstacle mesh (Crtl + P) and rename it so that it has the UCX_ prefix.
  6. Now's a good time to optimize the mesh if needed, apply/remove any modifiers, remove any unnessecary loop cuts and simplify the geometry as much as possible. Also ensure that all faces are convex and not concave (should not be a problem if they are tris or quads).
  7. In Edit mode with the new object, Select All (A) then Mesh > Split > Faces by Edges.
  8. In Object mode add a Solidify Modifier and adjust the thickness until it covers what it should.
  9. Then back in Edit mode go to Mesh > Separate > By loose parts.
  10. Batch rename the collision meshes find/replace .0 with _.

Box Modelling

This is mostly useful for Handrails and flatbars, the basic idea is to re-create your obstacle using simple boxes. The 3d cursor, vertex snapping and edge snapping can be very useful when doing this.

Examples

Note: Each colour represents a separate collision mesh.

Basic Ledge

Basic ledge without collision

Basic ledge with collision

Handrail

Handrail without collision

Handrail with collision

Curved Ledge

Curved ledge without collision

Curved ledge with collision

Transition

Quarter Pipe without collision

Quarter Pipe with collision