How do I make a player only overlap event?

What I’m trying to do is making an overlap even so only the player can trigger the overlap event because right now any object that’s set to generate overlap events will trigger this overlap event. So I’ve set up an overlap event which uses a variable to make a player only overlap event. The variable is an object reference to the first person character object which is the player. It looks like this:

67911-overlap.png

What’s happening is for some reason the blueprint keeps on activating even when I’m not overlapping with the object. It’s really weird because while it is a custom mesh, I did set the collisions and when I just use the regular overlap event it works like normal (meaning it doesn’t activate when the player isn’t overlapping) but when I use this node it activates even when the player isn’t overlapping with the actor. So how can I fix this?

Hello,

Not sure to completely understand but I may provide some help for your main problem :

  • you can use tags => tag the player pawn with “Player” and check if OtherActor has the “Player” tag
  • you can use cast => cast your OtherActor in the class of your pawn/player. If it succeed, it is your player. But be careful, if you use other pawn (like AI)
  • you can use collision system (I think it is the best one) to ignore/overlap/block => if you are not ease with that, I recommend you to check out this : Collision Filtering - Unreal Engine, and then create your custom collisions channels.

I didn’t find tuto or doc but you should check in Project Settings > Collision. From here, you can make new object channels. So, in your situation, the best will be to have a new channel Player and an other one for your trigger, that will ignore everything, except the Player, that will overlap.

Hope it helps.