Detect overlapping between two actors - bug or what?

1.) I have enemy actor BP, which is free roaming arround my level. Enemy have sphere collision to detect player etc…

2.) I have box with box collision (static mesh), randomly spawned arround level.

How can I detect when my sphere collision detect box?

I dont know am I retarded or I have some bug in level, but I cant to solve this problem.

I tried many ways, detect collision in enemy BP, in level BP etc…

I even created BP from that box, put another box collision, tried in box and enemy BP, but dont works.

I tried with “actor have tag” - dont work.

I tried with “Begin overlaped” event in box BP, I use compare other actor is same as enemy character = dont work.

I tried with “Begin overlaped” event in enemy BP, I cast to box BP, use GET OWNER in input, and AS BOX cast to that BOX COLLISION - dont work.

Every collision have ticked “simulation generates hit event” and “generate overlap events”.

And for end - some strange situation:

  • in box BP i use “Begin overlaped” on that box collision, and I use EQUAL to first person character - dont work, it cant detect character.

But if I use “get player character” instantly then random search for first person character - it works.

I tried even with BP interface.

Please can someone help me!

Have you tried setting collision preset to overlap all?

yes, I tried that, but nothing helps…

I just want to my enemy sphere collision detect that box - I lost about 3 hours and I cant resolve this problem.

Here is pictures, so you can see my enemy sphere collision settings, box settings and BP.

This is just one of many ways to try resolve this problem.

If I attached print string to “other actor” - it prints good, it shows that sphere collision is overlaping that box, but triger cant work.

Try making an Actor Blueprint from the box instead of using the mesh directly. then:

  • add a box collider to the actor
  • set the collision preset of the box collider to overlap all
  • check generate overlap events

In your character, you don’t necessarily need an extra collider, you already have the capsule component which has collision.

  • this capsule component should be set to collision preset “pawn”
  • generate overlap events should be checked.

Hope this helps!

I tried this - I make BP from that mesh, add collision but nothing helps.

Maybe is that problem - some bug betwen that existing capsule component collision and my custom sphere collision. I will check that today.

But then why this happens:

1.) I make BP from that box
2.) I add box collision in BP, and check “simulation generates hit event” and “generate overlap events”.
3.) On begin overlap in other actor pin - I add “Equel object” and compare is “other actor” same to first person character - I manually search for first person character. Nothing happens.
4.) But if I add “get player character” node and connect to that “Equel object” instantly then manualy search for first p.c. - it works.

Maybe is really problem with that custom collisions that I added to meshes that have capsule component.

But I need that additional collision’s, because I check some events like - is hand from enemy overlaping body from first person character etc (kick detection).

What is different in this two bp?

First is in level bp - and here works (I tested on player character).

Second is bp in player character - that dont works.


The second one is wrong because you do Get Owner, which refers to the player character, but you are trying to cast to box 1. So the cast fails and never executes the branch after that!

But what to use then “Get owner”?

I thought that “Get owner” will get the owner of that static mesh :confused::cool:

Can anybody have idea - what to use instand od “get owner”? Tomorrow I’m back on this project.