No overlap until movement occurs

Hello everyone, I’m spawning a projectile actor (that’s got some component copyed by another one), I need this actor to check if something’s colliding for damage application.
I’m using Event Begin Overlap and it works fine, but I also need to know if something’s overlapping at the moment the actor spawns, but “get overlapping actors” always returns an empty array until the actor is moved, I’d like to know why and how can I obtain the list of overlapping actors at spawn time!
Every solution, BP or C++, is welcome.

Thanks!

Are you using just the mesh for checking overlap or one of the components made for overlaps for your overlap?

I don’t really know for certain if there is a difference, but I’ve always made the projectile mesh no collision and used the specific overlap type components. I make side scrollers, and I’ve never had a problem like this. My characters can usually stand right next to stuff and their shots will still hit. (Granted, my character is never absolutely inside the target or they would take damage from enemy on overlap, so they may just be right outside overlap with the projectile too.)

All I can think of other than that would be trying a really tiny sphere trace starting from one end of your projectile to the other? That also seems like it would work if it really isn’t working with any sort of overlaps.

I’m already using a collision component for overlaps, the mesh has no collision, unluckily it would be hard to use any kind of tracing because the projectile class is just a base for different kind of projectiles that range from a grenade, to a beam, to a phisical “slash”, so I don’t think it’s possible to have a “general way” to trace the collision, the best would be using the collision component determined by child classes

I found a solution adding a very small offset at begin play (0.01) but it’s such a crude way to do it! So I still hope someone’s got some smart solution.

1 Like

i have the same problem. i move the collision box with my camera and as long as i dont move, i get the overlap events from the last overlap while moving.

Edit: I took instead of a overlapping box a multiboxtrace, this works for me.