Search Unity

Multiple touches per frame

Discussion in 'Editor & General Support' started by fertigo, Oct 27, 2014.

  1. fertigo

    fertigo

    Joined:
    Feb 15, 2014
    Posts:
    19
    Is it possible to get more than one touch positions per frame from the same finger? I don't mean multitouch, but more positions from the same finger during a frame.

    Problem that I have is that I'm making a line drawing app.. Creating a new line takes some time (especially on cheaper Android hardware) so the framerate drops. I'm already creating a new line at the end of the previous, but when I draw 2 lines shortly after each other I still suffer from low framerates. On cheaper hardware it gets so bad that a circle becomes a triangle. Even a bezier curve won't fix this;)

    Anybody knows a solution to get the intermediate touches. I already tried OnGui but also that gives me only one position per frame. Any other way to get some more positions?
     
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    Unity only calculates the touch positions one per frame.
    Maybe you can write a native plugin that sample the native touches more often than unity.
    Even if that's possible I'm not sure if you can update the value more then one a frame from inside of unity.