- Home /
Question by
patnaikaditya · Jul 24, 2018 at 06:12 AM ·
androidtouchdelay
Time delay on touch
I'm trying to build a mobile game using touch input. When I build it to my android device there is a little bit of time delay which is not ideal for my game. Here is the code I have so far:
void FixedUpdate()
{
if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Moved)
{
// Get movement of the finger since last frame
Vector2 touchDeltaPosition = Input.GetTouch(0).deltaPosition;
// Move object across XY plane
transform.Translate(touchDeltaPosition.x * Time.deltaTime, touchDeltaPosition.y * Time.deltaTime, 0);
}
}
Can someone please let me know how to correct this?
Comment
Your answer
Follow this Question
Related Questions
Android touch is not dynamic 1 Answer
Limits on "Input Actions Per Second"? 1 Answer
Need Android Help - How do I click and mouseover a 3d object? 1 Answer
Incorrect touch input on Android device 0 Answers
Touch Button Android 0 Answers