Search Unity

iPhone Swipe is a Slug

Discussion in 'iOS and tvOS' started by groovfruit, Nov 15, 2010.

  1. groovfruit

    groovfruit

    Joined:
    Apr 26, 2010
    Posts:
    257
    Hai

    Does anyone have any issues with speed of touch input performance? I'm using script that detects start and end touch, and the difference between the two determines the direction of the swipe. The swipe direction determines the direction of the player character's movement that is done with iTween.

    My issue is that the performance of this seems rather sluggish.. like a small time delay before the player actually moves. It's imperative that this delay doesn't exist as it inhibits on gameplay.

    Has anyone else had similar issues with Input (touch)?
     
  2. groovfruit

    groovfruit

    Joined:
    Apr 26, 2010
    Posts:
    257
    I seem to have resolved my issue by using FixedUpdate() instead of Update() and OnGUI().
     
  3. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    OnGUI should not be present on any class you use in the "game environment", at best, if at all, only on the menu. (having it there empty does not make the situation better, it will still hit in with the full overhead)

    ongui is a if not the major performance kill