Download

How Can I Distinguish Between Two Colliders in a Single Event Graph?

Hello, everyone. I’m brand-new with UE4, and I’ve looked everywhere for the answer. I’m here because I need some expert help.

Problem:

I have a door with a faux button and panel on each side (see “Viewport” wireframe graphic). I have a collision box beneath each panel. When my character overlaps either collision and presses “T”, the event graph I wrote checks to see if the door is opened or closed, then either opens or closes the door. I have a BP Interface set up and a character blueprint that allows players to interact with any such box in the game (see “Character Blueprint” graphic).

But how do I distinguish between the two collision boxes in the event graph?

The event graph only gives me one “Event Interaction” module (see “Event Graph” graphic).

Thank you.

Okay. Here’s how I was able to distinguish between the two colliders.

I created an “On Component Begin Overlap” for each collider that sets a single boolean for “Collision F” as true or false.

The result I can include in the global event interaction (see “Event Graph” snipping), which controls the door. If “Collision F” is true, I will have “Panel F” will light up before the door opens.

I’m going to include the result in my door mechanic blueprint now, but here’s the boolean-set part in the event graph.

If there’s a simpler way to do this, I’m all ears and welcome the help.