Delay before first touch position changes on iPhone -
i have problem using input.touches[0].position
on unity3d. sorry if problem unclear, find hard describe.
when start touching screen , start move finger position returned input.touches[0].position
doesn't change immediatly, have move little jumps current touch position.
this happens on iphone, don't have other touch devices.
here testable code illustrating it:
using system; using unityengine; // attach game object on scene public class testtouch : monobehaviour { private void update() { if (input.touchcount == 1) { // have add guitext component gameobject this.guitext.text = "pos: " + input.touches[0].position; } } }
i think problem cased early-gesture detection process.i'm not sure if solve question please try this:
if (input.touchcount > 0 && input.gettouch(0).phase == touchphase.stationary) { // sth. }
Comments
Post a Comment