Fire Overlap Event on same frame GenerateOverlapEvents is set to true

Hello! Bit of a weird question today. To preface this, I’ll say I’m using Unreal 5.6.1 and C++.

Right now, I have a custom Notify State setup so that during certain parts of an animation is playing, a Collision Capsule has GenerateOverlapEvents set to true. The expected outcome is that when I swing my sword, if the Capsule is overlapping with another character, it will print to log.

This mostly works. The issue is, an Overlap Event never fires if both the player and the enemy are standing perfectly still. It works as expected if either is moving, however.

I tried looking to see if there’s a way to manually fire an Overlap Event, but it doesn’t seem like it. Is there any way to see if something is overlapping with my Capsule when I turn on GenerateOverlapEvents? Or should I have it always on and find a different method?

Let me see if I understand. You have an animation notification that activates or deactivates a collision depending on the frame. I assume that collision is a child of the sword… There’s no way to manually generate an overlap, but instead of having a capsule on the sword or a box, it’s better to spawn a collision component. In the Kismet library in c++ you probably have these functions.

Anyway, for a sword I would use linetraces; they are less likely to skip collisions, although they are also more expensive.

1 Like

I might just end up going with a LineTrace, if that’s a better way to do this. I can’t imagine they’re extremely more expensive than a CapsuleComponent?

1 Like

As always, it all depends on your game. It’s like using the cast function; in a small game, you can use the cast function for everything and you won’t even notice the performance difference.

1 Like