0
\$\begingroup\$

So I'm making my first build in Unreal 4 using Blueprint. The "game" calls for the player character to grab a particular object (a static mesh actor) and bring it close to a door that will slide open if detects the item near. I have the door slide animation and a trigger volume around the door but I can't get it to work with the mesh actor I want. So far I've managed to get it to open with by pressing a keyboard key while being inside the trigger volume. I believe the volume trigger can detect any actor that is within its border, right? What nodes could I use to make this work?

UPDATE: Thanks to @Stephen I tried using the cast node solution but I still can't get it to work

If it helps, I've added an updated screenshot of my blueprint.

Cheers!

Updated blueprint, still not working

\$\endgroup\$
0
\$\begingroup\$

You are correct in that the trigger volume can detect any actor that passes through it and calls OnBeginOverlap and when it leaves, calls OnEndOverlap.

What you're not doing in your blueprint above is telling the trigger what is overlapping.

If you need a specific actor, pull off the Other Actor node and cast to your door opening object. From the cast node, use the Execution pin for success and put it into the Enter pin of the gate. This should cause your animation to play.

\$\endgroup\$
3
  • \$\begingroup\$ Thanks for the help!. So, I followed what you said I casted the OtheActor node to a StaticMeshActor conected to the item I wanted, but the door still wont react when I get close with the item. I uploaded my current blueprint to igmur [imgur.com/a/8ApeNGK] Thanks alot though!! \$\endgroup\$ Oct 5 '20 at 16:47
  • \$\begingroup\$ You haven't got anything going into the execution pin of the cast node. To start, try adding back the key press node you had before and check this still works. \$\endgroup\$
    – Stephen
    Oct 6 '20 at 8:34
  • \$\begingroup\$ I tried that, it doesn't trigger the animation. :( \$\endgroup\$ Oct 6 '20 at 15:56
0
\$\begingroup\$

The Generate Overlap Events box of the StaticMesh (the item) not ticked (set to false) so the trigger volume was not detecting anything. After ticking the Generate Overlap Events box, the Generate Overlap Events During Level Straming setting the Update Overlap Method to Always Update the Tigger Volume detected the item, the casting worked and the door would open.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.