Pawn bidirectional trigger

Custom actor which supports bidirectional pawn triggering. Powerful bidirectional trigger for pro features in your game, without the need of duplicated triggers.

Step 1

For proper trigger behaviour set the default pawn class (BP_PBT_Character) in your game mode class. In case you want to just extend your default pawn class to be able to support bidirectional trigger follow the steps from step 2.a. See VIDEO.

NOTICE: without proper pawn location calculation PBT system won't work.

Step 1a

If you want just extend your default pawn class please copy the logic from Begin play and Tick node from BP_PBT_Character blueprint. See VIDEO.

NOTICE: without proper pawn location calculation PBT system won't work.

Step 2

Find BP_BiDirectionalTrigger_Plane(PawnBiDirectionalTrigger content/Blueprints) and add it to any map.

Step 3

In the details panel set preferred settings for your BP_BiDirectionalTrigger_Plane.

  • Debug - visualize trigger and print direction on collision with default pawn.

  • Collision channels -a list of collision channels which will trigger BP_BiDirectionalTrigger.

  • Opacity - opacity of the trigger

  • Color - trigger color

  • Actor listeners - the list of actor whic have implemented BPI_BidirectionalTrigger_Interface. The trigger directionaly and opposite will be called on trigger overlap. Step 3a

  • Trigger once - If enabled, trigger will only once (first time). Afterwards its collision will be disabled.

Step 3a

On actors in which you want to set the custom behavior on overlap events:

  1. Add BPI_BidirectionalTrigger_Interface class defaults.

  2. Init Events on triggered directon and opposite in the actor blueprints.

Step 4

Once everything is set, you can assign to any BP_BiDirectionalTrigger in the level on its Overlap Directionally and Overlap Opposite event dispatchers, from which you retrieve following parameters:

  • Bidirectional_Trigger_Ref - reference to triggered BP_BiDirectionalTrigger

  • DefaultPawnRef - reference to pawn which triggered BP_BiDirectionalTrigger

See VIDEO.


BONUS. Child classes.

  • Additionaly, you can create child classes from BP_BiDirectionalTrigger for any type of custom behaviour in your game. Very POWERFUL feature.See VIDEO.

Questions?

Contact dino.duvnjak24@gmail.com to get more information about the project