Download

Annoying bugs with the equal (object) node.

Has anyone else experienced any unintended behaviour when trying to execute = object from the “other actor” variable on the begin overlap event on a collision box? When you try to connect the bool with a branch it always fails no matter what I do. I’ve tried printing the display name and it came out with the correct object but when I use a branch = object is giving off a false bool. Please help me this is infuriating i’ve had this issue for around a year with Unreal Engine now which leads me to believe i’m just being stupid and doing something wrong. I posted the blueprint below.

Zy1s6LU.png

Just managed to find a work around for this by using the “Get class” node and then feeding it into the “equal (Class)” node which i’m guessing is what you’re supposed to do anyway, the equal (object) node was just a bit misleading.

9aedd0cbbb76f198cf636a249d9a33c91ab49aa9.png

It looked like you were checking the other actor against an instance of your player character that was present in the world in the editor (as opposed to spawned on begin play). Are you sure the player you had in your level was being possessed on play, and that you weren’t actually just spawning another one?

Either way if you’re just trying to check that the actor that triggered the overlap is your player, the easiest way is to simply Cast the Other Actor to your player character class. If it succeeds, it’s your player, assuming you only have one instance of your player character in the world. If you had multiple instances of your player character (and switched which one you controlled like in Dragon Age or many other RPGs), you could just check that Other Actor == GetPlayerCharacter, since GetPlayerCharacter always returns the pawn that is currently possessed by your player controller.