Search Unity

Unity 4.6 touch not working?

Discussion in 'Editor & General Support' started by Pandamonium99, Nov 20, 2014.

  1. Pandamonium99

    Pandamonium99

    Joined:
    Jul 16, 2012
    Posts:
    14
    I'm trying to use touch input for android and iOS in unity 4.6 but for some reason it is not working. The only difference between this game and a previous one, is that the sprite i want to touch is on top of the new canvas UI. Would this affect the touch? Otherwise the script for the touch is exactly the same as previous games which do work with touching.
     
  2. Pandamonium99

    Pandamonium99

    Joined:
    Jul 16, 2012
    Posts:
    14
    Turns out, that it does in fact work, but Im having trouble with the actual code? Touch Phase Moved is apparently different then Began. Im calling Input.Touch(0).position in the moved code but its not returning accurate results. I want to be able to swipe and detect if I hit an object while swiping. Anyone know how I can achieve this?