Search Unity

Question about using the touchpad and clickbutton together.

Discussion in 'Daydream' started by pfreema1, Apr 24, 2017.

  1. pfreema1

    pfreema1

    Joined:
    Apr 5, 2017
    Posts:
    21
    Hi!

    Has anyone had issues with swiping and clicking the button getting crossed up in their game? I'd like to implement a system like this (both on the same main button):

    -swipe to switch weapons
    -click to shoot

    I was wondering if anyone has used something like this and had issues with a swipe and click getting mixed up when in use? I can't stand it when games have a button system like this that isn't responsive, or swipes when you wanted to shoot, shoots when you wanted to swipe, etc.
     
  2. reedny

    reedny

    Joined:
    Mar 4, 2017
    Posts:
    57
    I'm doing the same thing -- using touchpad for swipes and clicks. So far it is working mostly, the main issue is keeping a click where the user's finger slips from being seen as a swipe. Clearly you don't want a player to try to switch weapons and start blasting away.

    I started with the code from the GVR demo (GoogleVR\Demos\Scripts\ScrollingUIDemo\PaginatedScrolling\PagedScrollRect.cs) and have modified it as I test with different use cases for the acceleration and swipe distance.
     
  3. pfreema1

    pfreema1

    Joined:
    Apr 5, 2017
    Posts:
    21
    Very cool! I've been trying to think of other ways to have the user switch weapons. Currently my AppButton is a teleporter so that's not gonna work.

    I feel like a misfire of the swipe/click would be an immersion killer so I may hold out and maybe another idea for weapon switching will come to me.
     
  4. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    You could define time durations for long clicks or double clicks. I have done something similar in an almost complete asset for daydream that will have this and it works well. Obviously the remote only has 2 buttons that developers can use but you can effectively turn it into 6 buttons with doing this.

    The asset for daydream will be very similar to the apple tv one in my signature if your curious about it before its released.