Forum rules - please read before posting.

Vicinity Hotspot not showing all options

Hello everyone,

I'm using a custom 3rd person controller with a vicinity hotspot detector and it's working well however if I had multiple interactions to a hotspot it only shows the icon for the first. Am I missing something? Do I need a cycle button or something and they don't show up until I cycle them? I'm using select hotspot then interaction method. 

Another thing is that if I interact with a hotspot so that the interaction option appears and I then walk away from the hotspot so it's no longer in my vicinity the interact icon stays on screen.

Cheers. 

Comments

  • In what version of AC?  Please post a screenshot of your Settings Manager - there are many more settings beside the Movement method that control the way Hotspots are interacted with.

    A cycle button may be necessary depending on your chosen options, but if so it'll be listed in the "Available inputs" box in the Settings Manager.  You may also need to ensure your Interaction Menu is equipped to display your icons - this won't necessarily be the case by default if you're using your own UI, or created new icons in the Cursor Manager.

    Also, temporarily switch to the Demo game's Player, Tin Pot, so that there's no influence from the custom scripts - the first step will be to get everything working with "vanilla" AC.
  • Thank you.  What of my other points?  Did reverting to the default player and UI make a difference?  Are you relying on new icons in your Cursor Manager?
  • I tried it with Tin Pot and get the same outcome, my UI is the demo UI just duplicated and renamed. 
  • In what version of AC?  If not the latest, please update to v1.56d and test again.

    I cannot recreate the issue - things work using the same settings in the Demo game.  If you're using Unity UI, switch your Menu's Source back to Adventure Creator and re-test.  When testing with Tin Pot, also switch your Movement method back to Direct - let me know the results.
  • I was on C, I've updated to D and still had the same problem. I realised I'd been using the same hotspot to test to I duplicated it and only 1 of the interactions appeared on the new hotspot so I guess the hotspot must've got bugged somehow and only thought it had one. I've added more to the new hotspot and now all icons show however I can't select any of them and none are highlighted.

    Is the interaction menu supposed to dissapear when you move out of range because it still doesnt. 
  • No, the Interaction menu's visibility is tied to your cursor - see the Close interactions with setting in your Settings Manager.  You can call AC.KickStarter.playerMenus.CloseInteractionMenus(); to close it manually, but I will see about adding an option for this in an update.

    Set your Movement method to Direct.  More options show beneath the Hotspot settings panel in the Settings Manager - it may be that you need to tweak them to get what you want.  While this issue is ongoing, rely on AC for movement so that we can discount any custom script influence.

    Please let me know the results of the tests I mentioned previously.  Switch back to the Demo_MenuManager asset, and rely on Adventure Creator for your Interaction Menu's Source.  Are they now correctly working (or even just highlighting)?  Again, remove your own custom script from the scene so that we can work from common ground.  Once things are working with the default interface in vanilla AC, we can work to bring everything else back in.
  • I have tried the Demo scene with Tin Pot and changing him to direct control and vicinity hotspots with all the demo managers loaded and I get the same result in there (I had to add 2 interactions to one of the objects to get 2 icons). I'm also entirely using AC for my interface.

    I get close to objects, press the button I've assigned InteractionA to and the 2 hotspot interactions appear but I cannot select either with the keyboard or controller, none are even highlighted. 
  • Btw if anyone wants to get hotspot menus to dissapear when you walk away then add the following to the OnTriggerExit bit of the hotspot detector script:

    if (other.GetComponent <Hotspot> () && IsLayerCorrect (other.gameObject.layer, true)) 
    {
    AC.KickStarter.playerMenus.CloseInteractionMenus ();
    }


    I found if you don't include that if statement then the menu sometimes dissapears as soon as you open it, adding the if made it reliably stay open until you walk away. 
  • I'm not sure if I was clear but just thought I'd make sure... I am not using any sort of mouse clicking here, I am purely trying to select a hotspot, cycle interactions and select an interaction using keyboard (or controller) inputs. 
  • Thank you - yes, that was what was throwing me.

    When it comes to cursor control, Unity UI's base Event System doesn't allow for a cursor that isn't controlled by the mouse to interact with UI elements.  There is a discussion on writing a custom event system here - and a custom Event System prefab can be supplied to the Menu Manager.

    However, since you're locking the cursor on start, I'm guessing that you don't actually want to rely on the cursor to select interactions.  In that case, you can use the other options for the Select Interactions by field - namely Cycling Menu And Clicking Hotspot and Cycling Cursor And Clicking Hotspot.

    These options rely on the CycleInteractions and CycleCursors inputs respectively - though be aware that with the first option, you must make the Menu ignores cursor clicks so that a click to the Hotspot gets registered if the cursor is over it.

    It's also the case that a Unity UI-based Interaction menu will not currently highlight the selected icon when using Cycling Menu and Clicking Hotspot mode.  I shall see if such a feature can be added.


  • I tried both of those but still couldn't quite get what I wanted. Maybe it was the "ignore cursor clicks" I was missing. 

    Why is it that I can control the pause menu with just keyboard/controller? I think maybe I've not explained myself well enough. I literally just want to be able to cycle through the interaction menu just like you can the pause menu if you press W or S and it goes up and down. I don't want to use a cursor at all, I have hidden it completely I just want to select and pick an object in the interaction menu through key/button presses. 
  • Yes, this is all important information.

    Controller-based Menus work when the game is paused because AC can make the assumption that you don't want a cursor at this time.

    To get what you want, you have two options:

    1)
    The Cycling Menu And Clicking Hotspot option should give you what you're looking for - you can map an axis to CycleInteractions, or separate buttons to CycleInteractionsLeft and CycleInteractionsRight.  You won't be controlling the UI directly, but will be changing the selected cursor icon through AC, and AC will update the UI accordingly.

    Again, the selected icon is not currently highlighted in Unity UI, but I shall add this feature in the next release.  I recommend using this method, as the second is more complex:

    2)
    You can manually enable controller-driven Menus at any time with the Engine: Manage systems Action.  What you'll want to do is run this Action twice - once to enable this feature when the Interaction Menu is turned on, and again to disable it when turned off.

    You can create ActionLists that run when any Menu is turned on/off via the Menu Manager.  You will also have to:
    1. Disable the ability to move the player.  This is normally done with the Player: Constrain Action, but I expect you'll have to write a custom Action since you're using a custom movement method.
    2. Make sure both ActionLists have their When running fields set to Run In Background.
    3. If using Unity UI, enter in an element name into the First selected Element field in the Menu's properties box.  This is a requirement of Unity UI for controller-based UIs to work.
  • Number 1 is exactly what I want, cheers! I was trying to use toggle cursor instead of cycle interaction, that was my problem.

    I've also made a global variable I can set through AC which disables my character's movement so I can set Cycle Interactions to the same keys as my move left and right but if I've disabled movement then it only effects the interactions menu.

    Sorted!

    Thanks a lot.
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.