Forum rules - please read before posting.

Triggers & Hotspots

So I have a hotspot set up on a desk drawer, you can open the draw using InteractionA on the hotspot (I'm using Direct Control)  and collect a key from inside. Works fine. The only problem is, the hotspot detector doesn't care whether my character is stood in front of the draw, so the player can just open it from the side.

How can I make it so that the player must be stood in front of the drawers in order to open them? Can I use a trigger box, but the trigger only reacts to a key press rather than on entering it?

Comments

  • Change the Hotspot detection method, as described in Section 5.1 of the Manual.
    http://adventurecreator.org/tutorials/setting-player-prefab-auto-detect-hotspots

  • Thanks Chris, but I already have the detection method to Player Vicinity, Nearest Only. See, the hotspot detector will just pass right through the desk, and activate the drawer hotspot. It's not a game-breaker or anything like that, it's just that I want the player to have to be standing in front of the drawer, and facing it, in order to open it. Here's a video anyway.

    https://www.youtube.com/watch?v=2kCSHv-p350&feature=youtu.be


  • edited April 2016
    Hi Deckard,

    I don't think that a player would mind if you kept this interaction of opening the desk from the side...

    But to to get what you want (open from the front only):  I would have the draw hotspot off upon start, and then, put a trigger in-front of the desk, which then turns the hotspot on when player is inside.

    Cheers.

    K
  • Oh should note: the hotpsot is able to be used from the side due to the hotspot detector size on you player.
  • Thanks @klarax - indeed, changing the size and shape of the Hotspot Detector is how you control what Hotspots are detected.  Moving it out in front of the player, for example, stops them from being detected when the player is not facing them.  For specific cases, you could also enable/disable Hotspots with Triggers.
  • @klarax Good suggestion with the trigger, there - I knew a trigger would come in somewhere in this situation .

    I'm also going to try and implement the FinalIK Interaction system, now I have Snebjorn's script working. FinalIk has Interaction Triggers that also specify the distance from and which direction you must be facing before the character is animated.

    Another way is to force the character to walk round to the desired marker as part of the action list, before animating the drawer opening.

    A few solutions really. Thanks for your time guys.

  • I don't like how the Hotspot detector ruins the character parent pivot prefab...
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.