If you’re reading this, there probably aren’t very many posts yet. But don’t worry, you can be the first! Either create a new post or just reply to this one to say ‘hi’.
Hey there,
Suggestion here to encourage some best practices. Instead of using the placeholder channel defines, which really don’t give any information about what we’re looking at to the reader, you should create a new define with a clear name. For example
#define ECC_Spawn ECC_GameTraceChannel2
Then we can use ECC_Spawn in the trace code and its clear what we’re tracing for!
Thanks!
Did I not use a constant for this? If not my apologies, I did mean to. Is there an advantage to using the #define over a constant?
It’s just what I saw in Epic’s code though I don’t see why
constexpr ECollisionChannel ECC_Projectile = ECollisionChannel::ECC_GameTraceChannel1;
constexpr ECollisionChannel ECC_Weapon = ECollisionChannel::ECC_GameTraceChannel2;
wouldn’t work.
Fair enough.