# Overlapping not registered when actor is spawned

**URL:** <https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189>\
**Category:** Blueprint\
**Tags:** unreal-engine, FeatureRequest, UE4-26, Blueprint, question\
**Created:** [March 19, 2022, 5:04pm UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189 "2022-03-19T17:04:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ullebullan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ullebullan](https://forums.unrealengine.com/u/Ullebullan)\
**Post date:** [March 19, 2022, 5:04pm UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189/1 "2022-03-19T17:04:03Z")

</div>

I am trying to give my enemy skeleton an aoe attack. When he starts to swing his axe I spawn an actor and when the attack is finished I destroy the actor.

The actor that I spawn is the half transparent black box in the first image. In the second image is all the code for that actor. All the code is ment to do is to print "INSIDE’’ if the player is inside the Mesh Component and “OUTSIDE” if the player is outside the volume.

My problem:  
When the actor is initially spawned (with the player standing inside) the print says “OUTSIDE” until the player moves, then it says “INSIDE”. When the actor is initially spawned I want the print to be “INSIDE” if the player is inside.

 ![A](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/f/4/bf44e8c9d490c9bd09e76390fd188947a5e85856.jpeg)

 ![B](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/d/5/ed517a22e5a9b9df7431281c4656e58ecd5525b4.png)

If anything is unclear or if more information is needed I will gladly provide it.

---

<div class="post-metadata">

**Author:** ![Yaklakootmaa2](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/yaklakootmaa2/32/1194607_2.png) [@Yaklakootmaa2](https://forums.unrealengine.com/u/Yaklakootmaa2)\
**Post date:** [March 19, 2022, 6:19pm UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189/2 "2022-03-19T18:19:44Z")

</div>

Made an AOE sphere on projectile

 ![UEaoe2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/b/6/0b62470817db243020443e18739ad072f374bc90.jpeg)  
It has no collision settings by default  
 ![UEaoe3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/8/9/b896325a6fc31248142950e36d619ebb324de0cf.png)  
Then I’m using this event to get all pawns inside this collision sphere  
 ![UEaoe1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/b/1/6b1747d13deccac0731d5f6c316a9021d137840f.png)  
And here is my AOE function inside projectile  
Pay attention to the node inside red square, this the way to turn on collision with pawns if it’s needed, In my case projectile might be optionally with AOE  
 ![UEaoe4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/3/3/033c0f9ce1e427a9068ba85f99469075a0db2e6e.png)  
i have different scenarios when I’m using AOE, in this case - the lifetime  
 ![UEaoe5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/9/e/39ede36d5d37fb5b1ec893193dc2296cf3be0f1d.png)

---

<div class="post-metadata">

**Author:** ![Ullebullan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ullebullan](https://forums.unrealengine.com/u/Ullebullan)\
**Post date:** [March 19, 2022, 7:53pm UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189/3 "2022-03-19T19:53:05Z")

</div>

The collision is working fine for me. When I stand inside the static mesh component it prints “INSIDE” and when I step out it prints “OUTSIDE”. My problem is that if the static mesh component ( transparent black box) is spawned with the player already inside the print says “Outside” until the player starts moving.

I dont think your solution is going to work for me because I use a static mesh component while you use a sphere collision to check for collisions.

---

<div class="post-metadata">

**Author:** ![Yaklakootmaa2](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/yaklakootmaa2/32/1194607_2.png) [@Yaklakootmaa2](https://forums.unrealengine.com/u/Yaklakootmaa2)\
**Post date:** [March 19, 2022, 8:16pm UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189/4 "2022-03-19T20:16:06Z")

</div>

There is not much difference is it collision or static mesh, both components have the same ability to overlap  
My way works as intended. You should use the begin overlap event, it helps in such cases when something appears.

---

<div class="post-metadata">

**Author:** ![Ullebullan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ullebullan](https://forums.unrealengine.com/u/Ullebullan)\
**Post date:** [March 19, 2022, 8:27pm UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189/5 "2022-03-19T20:27:11Z")

</div>

I have actually tried this already. If the static mesh component (transparent black box) is spawned with the character already inside the begin overlap event is first triggered when the player steps out of the box and then in again.

In that case I would like the begin overlap event to first trigger when the actor is spawned and the player is inside. Hope you understand, thanks for your response!

---

<div class="post-metadata">

**Author:** ![Yaklakootmaa2](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/yaklakootmaa2/32/1194607_2.png) [@Yaklakootmaa2](https://forums.unrealengine.com/u/Yaklakootmaa2)\
**Post date:** [March 19, 2022, 8:32pm UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189/6 "2022-03-19T20:32:52Z")

</div>

Didn’t understand the problem with the begin overlap event.  
I literally do the same, projectile flies with “hidden” collision, on some point this collision appears for one moment and starts overlapping with each pawn inside.

---

<div class="post-metadata">

**Author:** ![Ullebullan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ullebullan](https://forums.unrealengine.com/u/Ullebullan)\
**Post date:** [March 19, 2022, 8:40pm UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189/7 "2022-03-19T20:40:20Z")

</div>

If you remove the bullet and enemy movement so that they are both standing still and then spawn your bullet inside an enemy does the begin overlap event trigger?

---

<div class="post-metadata">

**Author:** ![Yaklakootmaa2](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/yaklakootmaa2/32/1194607_2.png) [@Yaklakootmaa2](https://forums.unrealengine.com/u/Yaklakootmaa2)\
**Post date:** [March 19, 2022, 9:44pm UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189/8 "2022-03-19T21:44:38Z")

</div>

Ok, I got you, I didn’t try this  
It is quite strange if it works like that

---

<div class="post-metadata">

**Author:** ![Ullebullan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ullebullan](https://forums.unrealengine.com/u/Ullebullan)\
**Post date:** [March 19, 2022, 10:06pm UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189/9 "2022-03-19T22:06:33Z")

</div>

What do you mean? Do you mean that you find it strange that the begin overlap event is not triggered initially? Anyway, it seems like your solution does not work in my case but thank you for responding and taking an interest in this problem!

---

<div class="post-metadata">

**Author:** ![Yaklakootmaa2](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/yaklakootmaa2/32/1194607_2.png) [@Yaklakootmaa2](https://forums.unrealengine.com/u/Yaklakootmaa2)\
**Post date:** [March 20, 2022, 6:53am UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189/10 "2022-03-20T06:53:33Z")

</div>

I got an idea of how you can try to handle this issue. You can slightly move spawned box right after the spawn.

---

<div class="post-metadata">

**Author:** ![Ullebullan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ullebullan](https://forums.unrealengine.com/u/Ullebullan)\
**Post date:** [March 20, 2022, 11:42am UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189/11 "2022-03-20T11:42:15Z")

</div>

Thanks for the great idea! I tried some different variants of this.

1: On begin play I used the SetWorldLocation node with the Sweep option set to true, then moved the mesh component up some units. Did not work.

2: On begin play I then tried using the MoveComponentTo, this also did not work.

3: On event tick I moved the box up 0.01 units with the SetWorldLocation node with the Sweep option set to true. This made it so that the print always results in “OUTSIDE” even if the player is moving within the component bounds.

---

<div class="post-metadata">

**Author:** ![Yaklakootmaa2](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/yaklakootmaa2/32/1194607_2.png) [@Yaklakootmaa2](https://forums.unrealengine.com/u/Yaklakootmaa2)\
**Post date:** [March 20, 2022, 11:45am UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189/12 "2022-03-20T11:45:27Z")

</div>

That’s interesting, in such conditions I’d prefer to scale up the bounding box from NPC towards the attack direction

---

<div class="post-metadata">

**Author:** ![Ullebullan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ullebullan](https://forums.unrealengine.com/u/Ullebullan)\
**Post date:** [March 20, 2022, 12:18pm UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189/13 "2022-03-20T12:18:12Z")

</div>

I think the problem might be with the player. When the transparent black box gets created the player actor needs to somehow send out a collision update. What I think might work is to move the player slightly right after the box is created.

---

<div class="post-metadata">

**Author:** ![Ullebullan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ullebullan](https://forums.unrealengine.com/u/Ullebullan)\
**Post date:** [March 20, 2022, 12:23pm UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189/14 "2022-03-20T12:23:48Z")

</div>

This worked!  
After the box gets created I move the player forward and the back on the X axis, this is to “awaken” the player’s collision. Hope this helps anyone facing the same issue in the future and thanks for all the great ideas for solutions from @Yaklakootmaa2

 ![D](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/6/9/7699bcd569aebbba3459a33608f78c794911850e.png)

---

<div class="post-metadata">

**Author:** ![Yaklakootmaa2](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/yaklakootmaa2/32/1194607_2.png) [@Yaklakootmaa2](https://forums.unrealengine.com/u/Yaklakootmaa2)\
**Post date:** [March 20, 2022, 12:31pm UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189/15 "2022-03-20T12:31:38Z")

</div>

Just tried to move the collision sphere and it works. But it works with significant delay - after couple of seconds

---

<div class="post-metadata">

**Author:** ![Ullebullan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ullebullan](https://forums.unrealengine.com/u/Ullebullan)\
**Post date:** [March 20, 2022, 12:38pm UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189/16 "2022-03-20T12:38:10Z")

</div>

Does this solution not work for you?

---

<div class="post-metadata">

**Author:** ![Yaklakootmaa2](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/yaklakootmaa2/32/1194607_2.png) [@Yaklakootmaa2](https://forums.unrealengine.com/u/Yaklakootmaa2)\
**Post date:** [March 20, 2022, 12:40pm UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189/17 "2022-03-20T12:40:53Z")

</div>

Works but I’m wondering why it works so weird. Have never met this issue before because most of the my game’s stuff is moving

---

<div class="post-metadata">

**Author:** ![Ullebullan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ullebullan](https://forums.unrealengine.com/u/Ullebullan)\
**Post date:** [March 20, 2022, 1:07pm UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189/18 "2022-03-20T13:07:34Z")

</div>

I think it is because there is no problem with the transparent black box registering collisions but that the player capsule only sends out collision updates when it changes its transform somehow, might work to scale or rotate the capsule as well.

---

<div class="post-metadata">

**Author:** ![Yaklakootmaa2](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/yaklakootmaa2/32/1194607_2.png) [@Yaklakootmaa2](https://forums.unrealengine.com/u/Yaklakootmaa2)\
**Post date:** [March 20, 2022, 1:10pm UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189/19 "2022-03-20T13:10:05Z")

</div>

Will keep it in mind maybe later it might be helpful

---

<div class="post-metadata">

**Author:** ![Tom8788](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tom8788](https://forums.unrealengine.com/u/Tom8788)\
**Post date:** [August 30, 2022, 9:17pm UTC](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189/20 "2022-08-30T21:17:35Z")

</div>

I have the same issue. I save two actors that are overlapping. reload those two actors from the SaveGame object, I spawn them, and although their colliders are touching, they do not register any overlap. I tried to move them back and forth with 1 on the X-axis right after the spawn, but still doesn’t work. Any other suggestions?

[Next page](https://forums.unrealengine.com/t/overlapping-not-registered-when-actor-is-spawned/508189.md?page=2)
