Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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)

Product Version: UE 4.7
more ▼

asked Sep 14 '15 at 10:42 AM in C++ Programming

avatar image

125 11 19 129

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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.

     // in order to use this custom channels
     // we recommend to define in your local file
     // - i.e. #define COLLISION_WEAPON        ECC_GameTraceChannel1
     // and make sure you customize these it in INI file by
     // in DefaultEngine.ini
     // [/Script/Engine.CollisionProfile]
     // GameTraceChannel1="Weapon"
     // also in the INI file, you can override collision profiles that are defined by simply redefining
     // note that Weapon isn't defined in the BaseEngine.ini file, but "Trigger" is defined in Engine
     // +Profiles=(Name="Trigger",CollisionEnabled=QueryOnly,ObjectTypeName=WorldDynamic, DefaultResponse=ECR_Overlap, CustomResponses=((Channel=Visibility, Response=ECR_Ignore), (Channel=Weapon, Response=ECR_Ignore)))
more ▼

answered Sep 14 '15 at 01:38 PM

avatar image

703 40 32 123

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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:

 ETraceQueryType MyTraceType = UEngineTypes::ConvertToTraceType(ECollisionChannel::ECC_GameTraceChannel2);

Then You should use MyTraceType to Trace Function( Ex: SphereTraceMulti() )

more ▼

answered Mar 01 '18 at 10:26 AM

avatar image

36 2 6

avatar image intoxicat3 Jul 01 '19 at 06:31 PM

ETraceQueryType - 4.22: no such variable type :(

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question