Advanced collision in UE4
Before we define the functionality for our new service, let's quickly talk about collision in UE4. Collision in UE4 uses a channel system. Collision channels are effectively flags we can set on each collidable object to inform how the object should behave in any given collision situation. You may have noticed when we set up the collidable component of an object we set the collision profile name or collision type to either NoCollision
, OverlapAllDyanmic
, Pawn
, and so forth. These profiles not only set the collision type of the object but also how that object will react to different collision channels.
Most of our interactions with UE4's collision system have appeared as follows:
The important elements to note here are the Object Type
property and the CollisionResponses
matrix. In the previous example we are stating that this object is of type Pawn
. Meaning that any time something detects a collision with this object, it will be considered part of the Pawn
channel....