Is overlapping actor on static mesh component

Hello, everyone!

I wish to check if two actors are overlapping based on their static mesh components.

As far as I understand, if I set a collision on the static mesh in the static mesh window I should be able to access this collision somehow, right? As a side-note, I can walk on the meshes and also see their collisions under the player collisions viewing mode.

I tried using the is overlapping actor node which says it will return true if any actor component is overlapping. However this seems not to be true with regards to static meshes, as it returns false when I have two meshes overlapping, but true if I manually add a box collision to the actor components.

Now I could add a collision component to every object and get the result I am after, but this is tedious and am I not
also adding twice as many collisions as I need?

Thanks in advance!

So “Is Overlapping” means they are occupying the same space. So if you have collisions on, the actors won’t overlap because they are colliding. What way are you trying to use this and maybe I could help guide you out? Your explanation is a little bit confusing, sorry :S.

Thank you for your quick reply!

What I am trying to achieve is to create a basic random dungeon based on a set of tiles. I wish to check if the tiles are overlapping, and if they are, delete the newly spawned tile.

I have created a simple setup to test when the objects are overlapping as seen below.
The sphere in the image is an actor blueprint which first casts to the large square gets an object reference, then to the smaller rectangle, gets an object reference and checks whether they are overlapping by using the isOverlappingActor node.

To debug I set my viewing mode to player collision.
This isOverlappingActor returns false for static meshes ( even though as you can see in the image that they have collisions and are overlapping), but returns true if I simply add a box collision component in either the large square actor, the smaller rectangle actor or both!

So what I am wondering is, if I add a box collision component to either one of my actors, does that not mean I now have two collisions on my object? Would it not be better if I simply could get the overlapping based on the already overlapping static meshes?

And thanks again! :slight_smile:

Sorry for the late reply! Had a busy weekend. So the first thing I would do is make sure the collision presets are correct for both of your actors and that they overlap with each other. (Collision | Unreal Engine Documentation). The reason it could work when you add a box collision component is because the collision presets on the collision component might be different than the one on the actor itself.