How can I have a trigger box detect a spawned actor has entered?

Hi guys

I have a trigger box moving back and forth and want it to detect when a ball has fallen into it. I have a ball spawning from a target point above the box and I have checked ‘generate overlap events’ in the ball… Everything works apart from the box detecting the ball has entered… I am not sure where to go from the ‘on begin overlap’ point to get it to work!

I have searched for answers and cannot find anything similar to what I am doing.

much appreciate any help

I believe you need collisions to be enabled (set to overlap on the appropriate channels, not block), and the ball needs a collisions (either a collision mesh, or a collision hull).

Yeah I have all that… I think it’s more the flow in the level blueprint I am stuck with…

If the OnBeginOverlap event is being triggered, you can test ‘other actor’ to see if it’s the right actor. What are you trying to accomplish exactly?

Well I have a ball spawning from a target point whenever I hit the space bar… It then falls and at the bottom is a box that moves side to side… The trigger is attached to the box that moves and have made it visible. That all works…

For debug purposes I have the box bring up some text when it’s entered… If the player enters it works… I am now trying to make it detect the ball that is being spawned… This is where I am getting stuck… What will I need from the ‘other’ output in the begin overlap?

There isn’t much difference in what you need to make it work for the player as you do for any other actor. Is OnBeginOverlap being triggered when the ball enters it?

Nope it doesn’t seem to be detecting the ball to be honest… What should I be using? Get class from actor?

The first step would be to make the event work. Make sure the collision hulls/meshes are all correct, and that the collision response settings are correct for both the box and the ball.

Once the event is triggering, you can cast other to test if it’s the right type of actor, and then handle it however you need.