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.
- I created a custom collision channel in the Project Settings. The default response for this channel is “overlap”.
- 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.
- 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.