Hey guys, im a beginner at c++ and just started learning ue5 so im sure im just doing something wrong here, but im creating an interaction system and everythings going well so far but i cant seem to link my custom trace channel to my c++ code. Ive got a custom trace channel that i want my interaction line trace to use that i set up in project settings, but when i call LineTraceSingleByChannel() in my c++ code the custom trace channel wont show up in the ECollisionChannel parameter field. How cam I get my line trace to only happen on my custom trace channel?
First answer of this post will lead you here, where you’ll “define” your custom channels.
Then you’ll be able to use them under collision presets in blueprints;
For the C++ part, If you look at the DefaultEngine.ini, you’ll se something like this:
ECC_GameTraceChannel::ECC_GameTraceChannel1/2/3/… are surpluses the engine leaves to you to define as you want.
You can even sugarcoat them to your liking;
And use them like this;
1 Like