Custom trace channel in c++?
I created a custom trace channel from the collision tab in project settings. It may sound stupid but I have no idea how to use my new channel in c++: for example I want to do a single trace using my custom channel, how can I do it? (I mean, when it comes to specify the ECollisionChannel parameter)
asked Sep 14 '15 at 10:42 AM in C++ Programming
They show up as ECC_GameTraceChannel1, ECC_GameTraceChannel2, etc. in C++. If you look in the EngineTypes.h file you can see this bit here, which tells you probably the best way to deal with it.
answered Sep 14 '15 at 01:38 PM
UE4 ver 4.17.2
See DefaultEngine.ini in your Project. You will found what you named TraceChannel rows, likes below: (If you made new TraceChanel "Tracer01", Search "Tracer01" in DefaultEngine.ini.)
ECC_GameTraceChannel2 is "enum ECollisionChannel". You have to change it to ETraceQueryType. Use UEngineTypes::ConvertToTraceType() for convert to ETraceQueryType from ECollisionChannel likes below:
Then You should use MyTraceType to Trace Function( Ex: SphereTraceMulti() )
Follow this question
Once you sign in you will be able to subscribe for any updates here