5. Test the Overlapping Actor

Make sure it is your Character overlapping the launchpad, so you only launch the Character.


Right now, that OnComponentBeginOverlap event will execute when anything overlaps the Box trigger. We only want to actually execute our launching behavior, though, if the overlapping thing is our avatar, or Pawn. Think of it as asking "Is the Actor overlapping the Box trigger the same Actor as our Pawn?"

We will do that by working with the Other Actor output from the OnComponentBeginOverlap event.

  1. Click on the Other Actor pin on the OnComponentBeginOverlap event, and drag into an empty spot on the graph and release to pull up the context menu.


    The context menu is adaptive, filtering by the pin you are currently working with to show you only nodes that are compatible.

  2. Type "=" into the search box to filter the available nodes, then select Equals (Object).


    We could set Side Scroller Char as the other input to the Equals node, but then if we changed the Character we were using, we would need to re-open this Blueprint and manually update that. Instead, lets get a reference to the current Pawn we are using.

  3. Right-click in an empty part of the graph to bring up the context menu.

  4. Type "Pawn" in the menu's search box, then select Get Player Pawn (under Game).


  5. Connect the Return Value output on Get Player Pawn to the second input on the Equals node.


    Now that we have got a node that will tell us if the Other Actor is the Pawn our player controls, we will use the answer to change the execution flow of our graph. That is, we will direct the execution flow as it leaves the On Component Begin Overlap node.

    For that, we want to use a Flow Control node, specifically the Branch node.

  6. Drag off of the execution pin on the OnComponentBeginOverlap node and release in an empty part of the graph.


  7. Type "Branch" in the search, then select Branch from the context menu.


  8. Connect the output pin of the Equals node to the input Boolean pin on the Condition node.


The graph is now ready for you to set up different behavior to execute depending on whether the overlapping Actor is your Pawn or not. In the next step, we will do just that, and set up Blueprint nodes to launch our Character if the result of the Equals comparison is True.

Select Skin

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback