Component Begin Overlap Not Working

Hi, I feel like I’m being stupid here, or missing something obvious, but I can’t figure out why my On Component Begin Overlap event isn’t triggering at all, I’ve never had a problem with it before, and I’ve watched tutorials to see if I’m doing anything wrong and they’ve all done the same thing; just added the Box Collision and added the event, but for me it isn’t working for some reason.

I’m trying to create water, and add some functionality for when a player overlaps with it, both the player and the Box Collision are generating overlap events, and have the default collision settings applied, but the event isn’t triggering at all, any help would be greatly appreciated, thanks!

Is the OnActorBeginOverlap having the same behaviour ?

Yeah that’s not working either

Check your collision settings in the project settings.
In my experience in 99% of all such cases the collision types are configured right.
Both object types have to be setup to collide/overlap with the other one.

Collision settings are all fine, the Box Collision is set to World Dynamic and overlaps with everything, and the Character is a Pawn and blocks everything except for Visibility channel, which it ignores, and they both generate overlap events. They are all on the default settings, just like in the tutorials I watched to see where I was going wrong

Is the collision on the upper most capsule of your actor?

What do you mean, the Capsule Component inherited from the Character class? If so, then yeah, the only changes I’ve made to the character hierarchy is with the camera and spring arm

Yes I meant this.

But wait. Did you try to set “Collision enabled” to “Query and physics”?

You set it up as “No physics collision” which means that you can only find objects of this type by “Tracing for objects” but not by actual collision.

Ah, I see what you mean, I’ve just changed the Collision Enabled to Query and Physics but it’s still not triggering the breakpoints

I’ve just created a brand new project, created a blueprint with a Box Collision, set the collisions for them (box BP and character) to be exactly the same as my main project, and added the overlap code, and it all works perfectly fine in the new one, so I have no idea what’s causing it not to work in the main project

Oh another thing.
When you add new collision types / object types etc. in the project settings you have to explicitely save and restart the editor/engine, else some changes may not be used correctly.

Perhaps it is only this.

Else: I’m happy that it now works for you :slight_smile:

I haven’t added any new Collision or Object types, I’m literally just using the default settings, and it’s still not working, it only worked in the blank project I created just to check if should work as is, but even with all the same settings in my main project, it’s not doing anything

Did you set this up for both objects?

Yep, I’ve also just right now in the same project made a new Actor BP with a Box Collision, set the physics up the same as the one in my water body, and added the exact same logic on Begin Component Overlap, and again it works perfectly fine

Perhaps you can find the difference by comparing the blueprints with the “diff selected” tool. select both blueprints, right click in them and choose “diff selected”

That’s a handy tool I never knew about, thanks!

I’ve just checked it and there’s no differences between them that have anything to do with collision settings

Yes this tool helped me already a lot but crazy that there is no difference.

I’ve just figured out what’s causing the issue, but I have absolutely no idea why it’s causing an issue or how to fix it; OnComponentBeginOverlap does fire, but only if you overlap from the bottom of the box, for some reason it doesn’t trigger when you walk into the collision box from either side or the top

I normally validate the Actor first, make sure that exists. I’m not sure if this is safe, may be… but I’d validate the Actor, and then the component. And then mess around with overlap settings on both actors. But start with simple, manage to validate the Actor first.
Edit: I saw the latest comment now… Again, I’d simplify the example and see if that overlap is problematic in a simpler case. Does it do the same with other overlaps, with other objects? Make a simple box with nothing else… Usually weird things happen when more code and more complex assets are involved.

Just looking at the images, the only significant difference I see is that in one case you have a material applied to your blueprint object, and since it looks like something about water, you might have altered physics behavior by applying a physics material or something.
Just a guess though, but might help.