Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
1
Question by mparl · Jan 16, 2018 at 03:58 PM · androidinputtouchlagdelay

Having an issue with touch input lag on certain Android devices, any help?

Hi. I recently released an app on the playstore: https://play.google.com/store/apps/details?id=com.mparl.simonsaysjump

I have tested it on a few mid-range devices with no problems such as an LG G4 and a Moto G5.

When testing on higher end devices, I have mixed results. Seems to be fine on a Galaxy Note 8 but has a touch input lag of around 0.2 seconds on a OnePlus 5.

I am sure this is the touch input lagging and not the entire game as there is an option for tilt controls which work without delay on the OnePlus 5.

When doing some research into the issue it seems to be a problem with using Unity for Android and I could not find a fix: https://forum.unity.com/threads/touch-input-lag-other-games-are-fine.239253/

I was wondering if anyone has experienced similar problems, or has a solution? (If you need more information about the problem please just ask)

I have also run out of housemates whose phones I can test on, so If anyone has the time to run the app on their device (especially if it is a OnePlus 5) and let me know if there's any input lag that would be very helpful.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Michael_Starmik · May 21 at 10:44 AM

Hi! I am having similar issue. I have a problem with Android input lag on my OnePlus 7T with this code:

 if (Input.GetMouseButtonDown(0))
         {
             if (EventSystem.current.IsPointerOverGameObject())
             {
                 Debug.Log("Hit UI, returning");
                 return;
             }
 
             Debug.Log("Checked for UI");
 
             Vector2 origin = new Vector2(Camera.main.ScreenToWorldPoint(fp).x,
                                  Camera.main.ScreenToWorldPoint(fp).y);
             RaycastHit2D hit = Physics2D.Raycast(origin, transform.forward, 0);
             Debug.DrawRay(origin, transform.forward, Color.yellow, 50f);
             Debug.Log("Fire raycast");
 
             if (hit)
             {
                 Debug.Log(hit.transform.gameObject.name);
             }
         }

For some reason, testing in Unity editor works fine, but when testing through my phone, it all gets one step behind for some reason: First tap on game object fine, then when I tap the UI element I get return as if tapping game object, then after taping on game object I get debug.log reaction from collision with UI and so on...

I think this might be related to your problem. Did you find any solution?

EDIT: I have tested both connection through Unity Remote 5, that's when lagging occurs

But when installing the app to the phone directly, tapping anywhere launches the action regardless of whether it is obscured by UI or not...

Why are the controls behaving differently?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

239 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Massive lag spike on first Input.GetTouch with nothing on scene but one script (Android) 2 Answers

Android Touch delta delay 2 Answers

I want to move my cube on right or left when I touch screen for Android devices; Please help me which script I have to use 0 Answers

Touch radius always returns zero on Android 0 Answers

UNITY 2D ANDROID DEVICE TOUCH PROBLEM 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges