Hi Everyone. I would like to know if anyone could help me, I have a box trigger and a ball(Static Mesh) now i just cant figger out blueprint for ONLY if ball and boxtrigger touch each other then something must happen.
So just ball and box must touch not player and other stuff.
In your ball Blueprint, you can reference a specific actor in your level. Create a new Actor Variable and make it Editable, then Compile. In your level, select Blueprint and go to Details panel. There will be a new section named Default with your new Variable in it. In drop down, select your Trigger Box.
Now in your Blueprint, drag your Variable into Event Graph and select Get. That’s your reference to specific Trigger Box you wanted. rest is simple: create an Event Actor Begin Overlap node, then link that to a Branch node. Drag off Other Actor pin and type == to get a comparison node, to which you can attach your Variable referencing Trigger Box.
What this is doing is checking to see if your ball is overlapping with something, and if it is, whether it is overlapping your Trigger Box. If that’s true, you can then drag off True pin of Branch node. In picture above, I am simply printing “Contact”, but yours can certainly do something more complex.
Any variables that are set to Editable can be edited when Blueprint in which they exist is in level. Place BP in level, and you should see its information in Details window. Any Editable variables can be adjusted there, and they will apply to that instance of BP in level.
In your level, select Blueprint and go to Details panel. There will be a new section named Default with your new Variable in it. In drop down, select your Trigger Box. – Im struggling on how to do this part, it just shows a checkbox @BenHalliday
As shown in first image in answer, after branch determines that a collision with specific trigger has occurred, you can place any additional blueprint nodes; replace Print String node with nodes to open your door. There are many possible ways to open a door, but that’s a separate question and I would encourage you to do a search in Blueprint Scripting section for others who have asked same sort of thing. Additionally, it would benefit you to look into documentation on Casting or Blueprint Interfaces.
i just did same graph.
Problem is that i don’t hear any audio(my event) when my object hits referenced trigger box.
I copied exact same graph.
How would i connect an audio event?
I think i am not doing it right.
As for print event. I cant see any strings on my screen either.
My object has also a boom and a camera attached to it.
I have also another float variable in blueprint to clamp camera following movement to certain constraints.
My object is just a static mesh.
Is there any problem with other variable ?
i can choose blueprint on thirdPersonController blueprint, but i cant see option on gameMode for choosing it.
how can i make it possible that i use specific overlapping on my main character?
Have you looked into casting? You can cast to your character and then call functions from your character inside of other blueprints. I’m not sure if this is what you’re looking for though, so could you be a bit more specific about exactly what you are trying to accomplish?
Hi Sean!
i am trying to create a side scroller game where camera stops scrolling if character enters a certain area. i created a blueprint with only collider in it, and i used OnBeginActorOverlap on 3rdPersonCharacter blueprint (got it from example map) that if it touches with collieder, camera detaches from parent and stops moving. i am using example map that is present in unreal, and player start is where player spawns as in picture.
However, i want to add multiple actors that do different things when character overlaps them, so i am using what answer is, but i can only see default tab on 3rdPerson controller blueprint. not on GameStart, as in screenshot. when i press play, i get an error message of accessed none.
accessed none error means that your variable is not actually being populated. Could you show me where in your blueprint you are using back trigger variable through a screenshot please?
i created blueprint trigger back, and made a variable inside my character controller and chose blueprint in variable.
i chose “get” by dragging it into screen, and i chose target “box” from end, which is actual coliider