Forum rules - please read before posting.

[SOLVED] Move player with double click only/ touchscreen integration

edited March 2014 in Technical Q&A
Hi Chris

thanks so much for making this forum, for such a great asset.

I am looking to move my character only using a double click/tap input (in this case a double tap on touchscreen will be the intended destination)

For a single click/touch/tap, I would like to reserve it for typical touch screen controls such as scrolling around the image, or pinch zoom when multiple touches are done etc.

Would you be able to point me to a safe way of modifying scripts, or suggest an ideal way of pursuing what i want to achieve so as not to break AC?

many thanks!



  • edited March 2014

    it does occur to me that I could potentially set the walkspeed to 0.  However, the character still turns to move, and the clickmarker appears. 

     Likewise, if multiple touches are used, they are understandably interpreted as a single click input, and the clickmarker will appear between the touches.  This is completely understandable given the way AC is designed primarily for point and click with a mouse.

    The ideal would be, if at all possible, to have the option to disable/enable either the single click or double click in the player prefab, and set the float speed for each input type independently (if they are used for that purpose.)    Is there a better way I may be unaware of to do that?

    ( If I am correct, the run speed is a multiplier for the walk speed?  so walk 2 and run 3 would mean that
    run is 3 times faster than walk, not just 1 iteration faster......and in the same way, a walk of 0 and run of 3 would return 0 for both?)

    Edit: my confusion above  regarding move speed is that i am using a 2d sprite in 3d world, using mechanim, and ive just reread the tutorial, so that is cleared up.

    Anyway, hopefully I am making sense, and any advice on how to pursue click input changes would be very much appreciated!


  • No worries, this is a simple fix - I'll put it into 1.29.

    In the meantime, assuming you're game is Point and Click, you can update it yourself within the PlayerMovement script, line 428:


    bool doubleClick = false;
    if (playerInput.CanDoubleClick ())
      doubleClick = true;


    if (!playerInput.CanDoubleClick ())
      playerInput.ResetDoubleClick ();
    bool doubleClick = false;
    /*if (playerInput.CanDoubleClick ())
      doubleClick = true;
  • edited March 2014
    Thanks so much Chris! I appreciate your help a lot!
  • edited March 2014
    Just for a mild bit of feedback

    Had a play about his morning, and it does, at times, seem quite hard to 'define' a double click, either as a double tap on the screen or a double click using the buttons of my laptop.  (admittedly I havent tried this with a mouse yet).

      It feels like i need to be very committed double click and timed very well to get this to read, and it sometimes doesnt register.  I am comparing this to the default single click, which can be read with a very light tap on my trackpad.

    It likewise feels more difficult than double clicking in any application on my laptop, which like the single click, feels quite casual and easy. 

    Presumably the definition of the doubleclick is defined with timing parameters between each click in AC, or something similar?
    Is there a way to refine this input to get the sweet spot?
  • ok!

    tracked down double click delay in the game engine prefab!  all good now, thanks Chris :)
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.