- Home /
Delay before first touch position changes on iPhone
I have a problem using Input.touches[0].position
. Sorry if the problem is unclear, I find it somewhat hard to describe.
When I start touching the screen and very slowly start to move my finger the position returned by Input.touches[0].position
doesn't change immediatly, I have to move a little then it jumps to the current touch position.
This happens on iPhone, I don't have any other touch devices.
Here is some testable code illustrating it:
using System;
using UnityEngine;
// attach this to a game object on the scene
public class TestTouch : MonoBehaviour
{
private void Update()
{
if (Input.touchCount == 1)
{
// you have to add a GUIText component to the gameobject
this.guiText.text = "pos: " + Input.touches[0].position;
}
}
}
Answer by Sam Bauwens · May 05, 2013 at 01:17 PM
Finally I just ignore the first delta, that is the first change in position, this solves my problem pretty well.
Your answer
Follow this Question
Related Questions
Problem with the touch control 2 Answers
Working with Touch screens... 1 Answer
Joystick / Button 3 Answers
iPhone - How to calculate a decent touch swipe speed? 2 Answers
Does Unity Remote 4 act the same as it would when it is on the app store? 1 Answer