Forum rules - please read before posting.

Touch input thoughts/questions/improvements/suggestions

So I ported my AC game/demo/prototype/thing to iPad for the first time this weekend and I was really pleased with how smooth the whole porting process was.

That said I was left a bit confused by AC's "touch input" mode options.

Out of the three options (Context Sensitive, Tap Hotspot First Then Interaction, Interaction First Then Hotspot) I felt that Tap Hotspot First Then Interaction would be the most intuitive one.

This is because I want to be explicit with every interaction (even at the cost of an extra click) rather than let the game trigger an action that may not be the one that I actually wanted to do.

So I tried to set this mode, however it's still quite confusing how it works in the game.

What seems to happen is that when I click on a hotspot, the interaction icons (usually Use and Examine in my case) appear. Then intuitively I try to click on one of them but what happens is my second click triggers the default interaction (Use).

After reading the manual I realised that this is "by design" and actually what I need to do is "hold my finger down and then place another finger on the screen to trigger the secondary interaction".

This "works" once you know what you need to do, it's not very intuitive though.

So my question is: Is there a mode where I can click on the actual buttons?

Ideally the way I'd want it to work would be: Click *and hold* on a hotspot, while I am holding the possible interactions slide out from my finger, then I drag onto an interaction, then I lift my finger and then the interaction triggers.

Is this possible currently? How easy would it be to add if not? I may have a go at adding it actually as I think it's essential it works this way for my particular needs at least.

Also similarly I had trouble getting the feature where hotspots highlight based on player distance.

I just couldn't figure out the right settings to get this to work. I'd either get all hotspots highlighting or none. Distance didn't seem to matter. 

And even when hotspots where highlighting it wouldn't happen in the expected way. What I'd expect to see would be the actual textual description of the hotspot to appear over the object/character as my character approaches it (similarly to the mouse hover on PC/Mac). Even cooler would be to have an alpha factor to it, so the further away I am (once within the eligible distance) the fainter the text looks.

What actually happens currently is just the interaction buttons appear. Again this is not very intuitive and not particularly helpful either.

On the subject of hotspots, I am playing an adventure game on iPad currently for reference and they have a very nice feature where holding your finger down for a couple of seconds will reveal all the hotspots in the current environment. When you lift your finger the textual descriptions of hotspots disappear again.

Lastly another somewhat clunky thing is that when you tap on the environment the default cursor appears (or interaction buttons if you tapped on an interactive object). However if your tap causes the camera to move these ui elements will move along with the camera rather than stay anchored to the object. I don't think this happens on PC (or at least I dont think I've noticed it if it does)


  • Well, a lot to take in here.  Let me deal with the bigger issues, first.  I'll number them so I don't get confused if you want to reply.

    1) The manual states that the method of "holding left, tapping right" is only for Context Sensitive mode - in Choose Hotspot Then Interaction mode, you should tap the buttons.  This works fine for me in my own testing.  Try using the Demo game's menu temporarily, to see if it works with that one.  If I recall, holding and letting go one touch is exactly how it should work.

    2) Be sure to add a Highlight script to your Hotspot's Object to highlight field.  You can even add the script to the Hotspot itself - it just needs that script to calculate the correct alpha.

    3) AC can only show one Hotspot label at a time, but you can override this by referencing a Highlight script's GetHighlightIntensity() function.  It will return a float that you can set as the alpha value of a custom Text label.

    4) If the Input button "FlashHotspots" is triggered, this will happen.  Since each designer will want a different method of triggering this, again a custom script is recommended.  You can simulate this button with the following code:

    AC.KickStarter.playerInput.SimulateInput (AC.SimulateInputType.Button, "FlashHotspots", 1f);

    5) For full control over the way your UI works, you may want to consider converting your Menus to Unity UI.  You'll then be able to correct their position through very simple code.

  • Thanks for the super detailed response Chris. A lot to take in from your side too so I'll have to take some time to process/try this.

    For now I gave step 1) a shot which reminded me why I gave up on "Choose Hotspot Then Interaction" in the first place:

    I seem to be getting just the default interaction icon (Use or Talk usually). The Look/Examine interaction is nowhere to be seen. With context sensitive at least both icons come up.

    I'll keep investigating..
  • Ok, some progress.. upon closer inspection (and I can't believe I am only just realising this) it appears that the "Examine" interactions of *all* the hotspots in the level are not present when I load the level on the Mac. They're still there working just fine on PC but for some reason it looks like they didn't make the transition to the Mac... No idea why that might be... Going to try and figure out how I can get them back as doing them all again manually on the Mac is probably not an option
  • Right, so after reverting everything and starting from scratch on Mac (thank god for source control!) I've managed to narrow it down a bit:

    So when you go into the settings manager and set the input mode to touch screen and the interaction mode to "Hotspot, Then Interaction" it appears that the latter setting in particular (the setting of the interaction mode), causes the *Examine* interactions to be removed from all hotspots that have been placed in the level when you Run the game.

    Indeed looking at the Hotspot2D prefab's state before and after this happens it looks like the prefab has all 3 interaction types before (Use, Examine, Inventory), whereas after you run the game after having set touch input and "Hotspot, Then Interaction" the prefab gets edited and the Examine interaction gets removed!

    I'll see if I can find out more...
  • Well I've tracked it down to HotspotEditor.cs line 96 where the code seems to require that the interaction mode is set to ContextSensitive so that it'll include the Look interaction.

    As a test I added || settingsManager.interactionMethod == AC_InteractionMethod.ChooseHotspotThenInteraction

    to that if statement and now my Examine interactions don't get erased anymore.

    However in the actual game I am still just getting the Use interaction which is quite strange so now I am investigating why that might be... I am guessing a similar restriction in the code that makes the actual buttons appear
  • The Examine interactions are supposed to be removed once you set your Interaction method to anything other than Context Sensitive.  With Choose Hotspot Then Interaction mode, the point is that you define exactly what you want your interactions to be - "examine" might not even be an option you want.

    The Examine interaction present in Context Sensitive mode are a separate variable, and you do have to re-build the interaction links if you change your method midway through development.  However, the Interaction lists themselves are still there: you just need to re-link them in the Hotspot editor.
  • Hmm.. right I see... so if I am understanding you correctly you're saying Hotspots have an associated list of interactions *per input/interaction mode*?

    So I may have a Use and an Examine interaction in Mouse and Keyboard/Context Sensitive mode, but I may not want the same interactions in Touch/Hotspot Then Interaction mode.

    Is that what you're saying?

    If I am indeed understanding the way it works, could you elaborate on the reasoning behind this functionality?

    I would have thought that once you set up a list of interactions per Hotspot you'd want those interactions to be available across any kind of input/interaction mode combination (at least by default - maybe in special cases you might want to override this, but those should be just that: special cases)

    It's not so much "changing your mind midway through development" the motivation is more to do with getting feature parity (as painlessly as possible) across different platforms

    Definitely as you say the fact that Interactions are separate objects and they can be quickly relinked does help, but not having to do that would be even quicker :)

    Unless I am missing a good reason as to why the current model is better...
  • It's not per input/interaction mode - the "examine" interaction is the only one that's separate.  All other combinations transfer, and the input method is irrelevant.

    Part of it is to do with the fact that AC didn't have "interaction modes" when it was first released - Context Sensitive mode was the only way of playing.

    The other reason, as I said before, is that the Examine interaction isn't something that will necessarily transfer to other modes.  But good reason or no - that's what it is.  The established user base means it can't be changed officially.

    You could, however, write a script that re-links them for you.  Have a look inside Hotspot.cs - all you really need to do is add the lookButton variable to the useButtons List, e.g.:

    useButtons.Add (lookButton);
  • Cool, thanks Chris, I'll follow your suggestion and see if I can implement this.
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.