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

**URL:** <https://forums.unrealengine.com/t/how-can-i-have-a-trigger-box-detect-a-spawned-actor-has-entered/313185>\
**Category:** Asset Creation\
**Tags:** ball, begin-overlap, overlap-events, unreal-engine, question\
**Created:** [March 30, 2015, 4:53pm UTC](https://forums.unrealengine.com/t/how-can-i-have-a-trigger-box-detect-a-spawned-actor-has-entered/313185 "2015-03-30T16:53:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_33de5303](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33de5303](https://forums.unrealengine.com/u/anonymous_user_33de5303)\
**Post date:** [March 30, 2015, 4:53pm UTC](https://forums.unrealengine.com/t/how-can-i-have-a-trigger-box-detect-a-spawned-actor-has-entered/313185/1 "2015-03-30T16:53:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Grogger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Grogger](https://forums.unrealengine.com/u/Grogger)\
**Post date:** [March 30, 2015, 5:48pm UTC](https://forums.unrealengine.com/t/how-can-i-have-a-trigger-box-detect-a-spawned-actor-has-entered/313185/2 "2015-03-30T17:48:53Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33de5303](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33de5303](https://forums.unrealengine.com/u/anonymous_user_33de5303)\
**Post date:** [March 30, 2015, 7:51pm UTC](https://forums.unrealengine.com/t/how-can-i-have-a-trigger-box-detect-a-spawned-actor-has-entered/313185/3 "2015-03-30T19:51:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Grogger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Grogger](https://forums.unrealengine.com/u/Grogger)\
**Post date:** [March 30, 2015, 7:54pm UTC](https://forums.unrealengine.com/t/how-can-i-have-a-trigger-box-detect-a-spawned-actor-has-entered/313185/4 "2015-03-30T19:54:10Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33de5303](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33de5303](https://forums.unrealengine.com/u/anonymous_user_33de5303)\
**Post date:** [March 30, 2015, 8:08pm UTC](https://forums.unrealengine.com/t/how-can-i-have-a-trigger-box-detect-a-spawned-actor-has-entered/313185/5 "2015-03-30T20:08:51Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Grogger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Grogger](https://forums.unrealengine.com/u/Grogger)\
**Post date:** [March 30, 2015, 8:11pm UTC](https://forums.unrealengine.com/t/how-can-i-have-a-trigger-box-detect-a-spawned-actor-has-entered/313185/6 "2015-03-30T20:11:48Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33de5303](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33de5303](https://forums.unrealengine.com/u/anonymous_user_33de5303)\
**Post date:** [March 30, 2015, 8:28pm UTC](https://forums.unrealengine.com/t/how-can-i-have-a-trigger-box-detect-a-spawned-actor-has-entered/313185/7 "2015-03-30T20:28:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Grogger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Grogger](https://forums.unrealengine.com/u/Grogger)\
**Post date:** [March 30, 2015, 8:31pm UTC](https://forums.unrealengine.com/t/how-can-i-have-a-trigger-box-detect-a-spawned-actor-has-entered/313185/8 "2015-03-30T20:31:23Z")

</div>

The first step would be to make the event work. Make sure the collision hulls/meshes are all correct, and that the [collision response](https://docs.unrealengine.com/latest/INT/Engine/Physics/Collision/index.html) 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.
