Search Unity

Override default zooming gesture on device

Discussion in 'BlackBerry' started by Elkis, Jan 22, 2014.

  1. Elkis

    Elkis

    Joined:
    Jun 15, 2013
    Posts:
    87
    Hi guys!

    When testing my game on a real device I have noticed that, by default, you can zoom-in/out when making a pinch gesture. However, as the zoom is on the unity player's screen and not in the game world, the HUD gets lost.

    How can I turn this feature off?

    Thank you!
     
  2. AlexThibodeau

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
    I have our QA guy taking a look at this. He may post here asking for details.
     
  3. TuesdayNinja

    TuesdayNinja

    Unity Technologies

    Joined:
    Apr 23, 2013
    Posts:
    17
    Elkis -

    I've tried doing this on a game I've worked on, but didn't see the HUD disappear. How did you script the pinch zoom? I threw this on the main camera and it worked fine. Try giving it a shot? If it still doesn't work, submit a bug (please attach your game!) and I'll take a look.

    Thanks,
     
  4. Elkis

    Elkis

    Joined:
    Jun 15, 2013
    Posts:
    87
    Thank you Alex!

    Hello Adam!

    I think I wasn't clear enough, I apologize.

    I did not script that behavior and it isn't a Unity bug. I think it is a feature of the BlackBerry OS 10 since it happens in other applications as well; I was just wondering if this could be turned off inside the game so I can override it with my own scripted behavior.

    Sorry for the misunderstanding!
     
  5. piacentini

    piacentini

    Joined:
    May 27, 2014
    Posts:
    28
    Related issue here: I actually have pinch/zoom implemented on my game for Android/iOS/WinPhone. However, this does not work on BB. It works as if there is no touchEnd event, apparently. When you try to pinch/zoom the interface works as if you were doing a single touch and drag. So... anyone implemented pinch/zoom on BB, or better yet, found a way to disable what the system is doing (most likely "eating" this event?)
    Tried on both Unity4 and 5.
     
  6. piacentini

    piacentini

    Joined:
    May 27, 2014
    Posts:
    28
    Ooops, I think I have answers for this. The two issues are not actually related.
    The issue on my game was kind of embarassing... pinch was not working because the pinch/zoom code was compiled only for UNITY_IOS, UNITY_ANDROID and UNITY_WP8. Adding UNITY_BLACKBERRY to the mix made it work correctly, of course. Sorry for the false report.
    The other issue (system-level zoom enabled) seems to be related to the Accessibility settings of the Device. You can disable this under SETTINGS. By default they are off, at least on a new device.
     
    Elkis likes this.
  7. Elkis

    Elkis

    Joined:
    Jun 15, 2013
    Posts:
    87
    Thank you for the info! This behavior remained as a mystery for me all of this time! I checked and, somehow, this Zoom was enabled in all of my test devices by default o_O