Trace Library

MassTrace includes a small function library including several functions meant to simplify traces and exposing async traces. These are either for writing your TraceSetting's code or simplifying your non-MassTrace code.

Problem with current trace functions

  • There's too many trace functions in C++ (Believe there's more than 30 in C++), this leads to a lot of confusion as to which one to use.

  • Blueprint traces are extremely limited when compared to their C++ counterpart.

  • Blueprint have no access to test or async traces.

  • Blueprints can not assign tags to traces for debugging in the collision analyzer.

  • Due to confusion around what functions to use and the limitations of Blueprint traces, a lot of uneccessary collision channels are made.

The solution:

  • Create one function for each shape and simplify the approach. In the end, all the traces are doing the exact same thing: Assigning Ignore/Overlap/Block for each collision channel and then performing a trace in the shape you assigned it.

    • This means you only have 4 trace functions, one for each shape. Then 4 more that are async. Giving you 8 in total.

  • Each trace function only asks of you to provide a FCollisionResponseContainer, which for some reason, has no functions exposing it to Blueprint, but it's still blueprint accessible. So I made the helper functions to properly use this struct in Blueprints.

  • Expose more debugging options and combine them all into one struct so its easier to find and modify all debugging options.

The majority of the time you'll be using CreateResponseContainerFromProfile or CreateResponseContainer to create your collision settings for the trace. I highly recommend using the first one and only using the latter if you must. This way, you can stay within the safe boundaries that come with by using Collision Profiles, but still have the option to customize specific channels when needed

Last updated