Line trace to trigger an overlap event

I am trying to trigger an overlap event with a line trace but I seem to be missing something. I have considered using a hit event instead. However, I really need to detect when the player shifts focus away from the target for a separate event.

  1. I created a custom collision channel in the Project Settings. The default response for this channel is “overlap”.
  2. I created a Line Trace by Channel using this custom collision channel. The line trace originates from my HMD (Oculus DK2) and ends where I am looking.
  3. I created an Actor BP with a static mesh as the root component. This mesh has the “Generate Overlap Events” flag checked and it collision is set to Overlap for the custom collision channel the line trace is using.

I have added debug strings for the Overlap and EndOverlap events. Since these are not easy to see with the DK2, I have been reviewing the log files after each attempt. So far, the debug strings only appeared during one playthrough attempt. During that attempt, there was only 1 overlap and 1 EndOverlap event in the log even though I looked at the target multiple times from different distances. I’m hoping that I just overlooked a basic step. I’ve reviewed all the documentation I could find on collisions and RayTracing. This helped me with the custom channel in the Project Settings but not to resolve the problem. Hopefully, one of you might know what the issue is.

1 Like

From what ive experienced this is not How Hit & Overlap events are used neither the trace. You can do a trace either for Objects or for Channels and get a Hit Result with the Informations. A hit event occurs when a Blocking volume collides with another blocking volume or mesh or whatever, same for overlapping.

Can’t you use an invisible mesh on your player BP to trigger The overlap?