Blueprint overlapping with self

Hey guys, I’m trying to make this game where a player blueprint with a separate mesh as a weapon tries to tag another player with it to kill them.

I’ve had some trouble and was hoping someone could offer some insight.

The issue is that I’m using a GetOverlappingActors node in the Tick loop for collision detection because I can’t use the ActorBeginOverlap event due to the fact that I need a single
collider within the blueprint to handle certain functions, the ActorBeginOverlap event seems to detect overlap across the entire blueprint object.
I tried setting the GetOverlappingActors node to filter all classes but the player blueprint but the problem is that collision is now being set off by another mesh within the blueprint.

When I place a visual mesh over the collision volume the mesh seems like its colliding with the collision volume and I get a printed string saying the overlapping actor is itself.

I tried to use the weapon mesh as the collision volume but it won’t recognize collisions against other players. I tried changing around the collision presets, but the issue there is, whenever I do that it won’t recognize any collisions which is obviously no good either.

Here’s what my blueprint is looking like right now.

&stc=1&d=1437785798

Any ideas?

If I can’t get this working I’m probably going to separate the player and the weapon into two separate blueprints but that would not be ideal.

Something you may be able to do is check “Is Locally Controlled”, which takes a pawn reference as an input. This is something I use for multiplayer replication when I want clients to perform an action to my player on their end rather than me doing it locally.

Thank you for the answer. My head still hurts a lot and there’s a lot to fix, but I believe this will help me get closer to my goal.

It’s doing some bizarre stuff though that I need to work though before I can post any kind of update.

**Edit

Oh okay, so IsLocallyControlled is going in the right direction but this is a local multiplayer game so unfortunately, both players are locally controlled lol. And for testing purposes player2 isn’t currently being controlled so still collides with itself.

I am also experiencing a bug of my actor now overlapping with itself when previously it did not

What I do with overlaps is add a desired tag on things I want to trigger, add a collision box/sphere/mesh at desired location/size where I want to detect overlap, then add an ~Actor has tag~ to a branch after the OnOverlap.
Also be sure to check your collision channels on all components of the BluePrint, set anything not intended to trigger overlap to Generate Overlap Events false. If you are overlapping yourself, you probably have components not wanted to generate events set to true. You also need to check the collision channels on the target actor.

Also remember that the collision box must be slightly larger than the mesh it represents if the mesh blocks the target, otherwise there is nothing to overlap.

c9425d2a4eb7c4bf224140827b4d8afbe4a28f32.jpeg

2 Likes

I’ve spent the last year developing an incredibly complex game with thousands of collisions. What I found is using generate hit works way better than overlap. Use on event hit. I can accurately get the collisions at speeds of 60,000 m/s.

Hey @MikeRPG, would you mind elaborating better what “generate hit” means? Instead of using Overlapping Events, you meant to use Hit Events? If so, what is the collision preset you’d use in your Collision Sphere?

Thanks.

https://docs.unrealengine.com/latest…sion/EventHit/

In the collision settings of the mesh there’s overlap and hit checkboxes (the mesh in the blueprint not the raw mesh asset). For more advanced physics and high velocities hit is desirable but not mandatory. For gameplay events and triggers you use overlap events. Some people use a linetrace instead of overlap/hit for certain situations (e.g. projectiles).

Thanks, @MikeRPG .

@**chiefGui **no problem, happy to help.