Trigger Actor & MyCharacter BP

Hi anyone,

I’m trying to interact from my character blueprint with an Trigger Box actor whithin my level but I can’t find the right way get a reference…

I have 2 cameras set up in my Character BP, and I would like to switch between them depending wheter the player is indide the trigger box or not.

I get the “TriggerBoxTest” reference inside my Level BP and create a boolean variable with begin & end overlap. Then I cast this variable to another one, wich is deifned the state of the branch node in my Character BP.

Is there a way to get a reference inside the character BP? I don’t know how to do this, but it will be easiest I think…

the easiest way would be to do your overlap in your character event graph. On begin overlap : From other actor output “cast to” the actor. On true change your camera and same with end overlap to come back to initial camera.

Thanks Fen,

But how can I get a reference from the trigger box in the character BP graph?
When I select it in the level, and then I reight click in the character graph, I don’t find any options to add an overlap event…

Edit : You don’t need a variable. sorry. in your character do “on actor begin overlap”, drag from the “other actor” output blue node and do “cast to” name of your blueprint. And same for on actor end overlap.

Sorry Fen,
It’s a little bit confuse in my mind…

  • I create a variable in my character BP. Type is TriggerBox.
  • I set a “BeginOverlap…” and a “EndOverlap” in the graph.
  • From the “other actor” pin, I search for a Cast To… But to what?? Cast To TriggerBox? I don’t find anything else…

Yes, it is so easy that it can seems difficult : In your character, do “event actor begin overlap”, from “other actor” node, drag a wire and “cast to” triggerbox, print string “In” and you don’t need variable.

It works.
Thank you Fen,