Line Trace for custom Object Type always false

If I do a line trace for a custom object type, result is always false, even though it should have hit. As soon as I change back object type and line trace object type to pawn, result is true.

Expected: custom object types should also return true if trace hits, just like trace reacts to default object types.

Go to project settings, add a new collision object type (for this example: player)
Add a pawn to scene, change capsule component → collision → object type to “player”
Do a line trace from camera to that object, with object type array added “player”
See that result is false
Now change pawn object type back to “pawn”
Set line trace object type array also to “pawn” and do line trace again
See that line trace returns true.

Hey Blue669,

I tested this in 4.8.3 way you described, and it returns true when i hit pawn with line trace. I have a couple questions to help clarify what I might be doing differently than you:

  1. Are you using LineTraceForObjects node?
  2. For Object Types input, did you Promote to Variable and give it a single element of Player?
  3. Is Default Response for Player Object Channel set to Block?
  4. Does this happen in a new project as well, or only in your current project?

Is there any additional information to help reproduce this? Would you mind uploading your test project somewhere and getting me a download link?


Thanks for your response. Yes, default is set to block. Here is my setup:

Left: line of sight check trace. Right: collision from player character capsule

Hm, I tried setting it up this way as well, in a BTService, but still don’t get false. Can you set this up in a new test project and upload that somewhere for me?


I haven’t heard back from you yet, so I’m resolving this for now. If you get opportunity to build a small test project in which this same problem occurs, please upload it somewhere and get me a download link to check out. Thanks!

Do line traces check for any other thing besides this collision object type? What else could cause line trace to fail even if it does hit object?

Line Trace for Object should return everything marked as Objects assigned to it, minus Actors assigned to Actors to Ignore. Unless Actor you’re trying to find is in that Actors to Ignore list, line trace should not be failing.

I can take a look if you want to send me your project via PM on forums, or if you can reproduce this in a smaller test project.

I had this same issue with a sphere trace. Rebooting client fixed it. I think something wasn’t saving with project settings or something, not too sure. Fixed though…

I just wasted an hour of my time with this exact issue. Rebooting client fixed it as well. Amazing. Thank you Cory.

For epic - bug seems to happen when you:

Add a CapsuleTraceForObjects (example) to your BP, but you don’t have a custom channel type yet.
Go to project settings and add a new channel object type
Go back to BP you can’t select your new channel type yet. So Compile.
Now select custom object type.


Restarting client fixes it.

Hello. I have same issue. What do you mean with restarting client? I havent been able to solve it yet.

What do you mean with rebooting client? I have same issue and can’t seem to find a solution

Boy this is from 2018. But I just meant reboot unreal engine.

Thanks for answer! Yeah, sorry… I had to ask, since I did restart unreal but it didnt fix my problem. I’ll do project from scratch. Luckly I was just testing some mechanics for project i’m planing. I’m still somewhat a beginner in unreal engine.

Thanks again!