# Can't linetrace for custom channels?

**URL:** <https://forums.unrealengine.com/t/cant-linetrace-for-custom-channels/509273>\
**Category:** C++\
**Tags:** Raycast, unreal-engine, UE4, CPP, question\
**Created:** [March 23, 2022, 8:24pm UTC](https://forums.unrealengine.com/t/cant-linetrace-for-custom-channels/509273 "2022-03-23T20:24:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shadowsora](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowsora](https://forums.unrealengine.com/u/Shadowsora)\
**Post date:** [March 23, 2022, 8:24pm UTC](https://forums.unrealengine.com/t/cant-linetrace-for-custom-channels/509273/1 "2022-03-23T20:24:55Z")

</div>

So I made a custom channel called interactable, and in blueprint it seems to trace just fine, and return true when collided with. However doing so in C++ does not allow for it to be checked. Here’s my code, blueprint that works, and proof of the channel DeafaultEngine.ini refers to it as (2).

 ![code](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/8/6/e86301f1f5cf760b276a10d3a656fbcc11f65c22.png)  
 ![Blueprint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/2/3/823e8693447b7d7776ba01775774a17f2690359b.png)  
 ![DefaultEngine](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/d/d/6dd3e88fd58f43c9d640601c6b32f4746544c31b.png)

I also had it as just ECC\_GameTraceChannel2 before without the ECollisionChannel:: prefix. and I’ve checked it with ECC\_Pawn and ECC\_WorldStatic, which worked just fine. Please any ideas help. I’m banging my head against a wall at this point.
