SphereTrace for very specific actors

Hi, I need to get references of all actors that are located somewhere in the direction of where my camera is looking, but only those that have an audio component within them. I am thinking of using a SphereTrace for that, but not sure what to trace for.
So, for example, there are two cubes 200 units away from me and only one of them has an audio component attached to them; if I look in their direction, I want to

  1. Get a reference to that one cube with audio and not the other

  2. Maybe alter some parameters of that component such as volume or range.

Much thanks.

  1. Assuming the “cube” is a BP, create a bool inside it called “Has Audio”

  2. Make this variable public, so that you can set each one accordingly in the details panel (hopefully you already know how to do this)

  3. If trace is successful, you have acquired your reference. Then have a branch asking whether or not that “cube” has audio or not. If true then… etc etc

Hope this helps !!

Thanks, but what do I feed to the “Object Types” in the SphereTrace and what if the trace hits more than one cube?

This node accepts an “EObjectType” - you can create this variable inside your “cube” BP

Okay, thanks, I will give it a try.