Trace Channels
Working with collision channels in C# is not great, as the engine internally uses ECollisionChannel
mapped to ETraceTypeQuery
for BP-exposed tracing functions like LineTraceByChannel
and others. By default, these mappings are not intuitive in C#, as they are just numeric IDs, with no info about the collision channel name.
To bridge this gap, the ETraceChannel
provide a way to work with more readable and user-defined channel names in C#.
ETraceChannel
The ETraceChannel
enum defines a set of collision channels, each of which maps to a corresponding entry in the project's collision settings.
ETraceChannel to ETraceTypeQuery
Here's how to use the ETraceChannel
enum and the ToQuery
to use it with ETraceTypeQuery
:
Last updated