OverlapBegin in C++ not working

Hi Everybody

I am trying to implement simple collision using OverlapBegin UFunction in my C++ code and it doesn’t work. This prevents me from continuing working on my game. Can someone tell me what I’m doing wrong?

I have CubeOne:

And then CubeTwo:

And in the Editor:

Upon hitting play, nothing prints to the screen. So no collision. How come something as simple isn’t working? I think I’m doing everything right.

Extra info from BPs:
Cube two:

Cube one:

So what’s going on? Please help

are they already overlapping on begin play?

if so in begin play try setcollision with overlaps again

or you can getoverlappingactors already in begin play, causee if they are already overlapping beginoverlap will not fire on PIE at start

Thanks Grimnir, it wasn’t working because they were started in the game as being overlapped.

1 Like