Download

How do I get the "Enter" key input to work within a trigger box?

So, I’m doing a horror game with the Oculus Rift.

I set up the Enter key strung to the Open Level along with a beginoverlap trigger box, regardless where I stand in the room and hit Enter, it still starts the game.

How can I go about with this?

Thank you.

You need to do an overlap event on the trigger and then check that overlap is true before firing the event.

So wire your onEnter to a custom event … have the custom event check the overlap … if it is true have it open the level … if it is false do nothing.

Create a custom event and string it to Absolute on the Open Level?

Imgur

As qdelpeche said, just put a “Branch” node on the enter key press. When the player overlaps the trigger set a boolean to be true, and check that boolean on the Branch.

Here is an example of an exclusive trigger box set to receive input on overlap.