Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
avatar image
0
Question by nachobeard · Jan 13, 2014 at 12:29 AM · touchestouch.deltaposition

iOS touch input stutters randomly

Hi

Short version:

When I drag an object in circles around the screen on my iPhone and iPad continuously for a little while, every couple of minutes the object stutters for 5-15 seconds. The screen frame rate is a solid 60 fps, but the touch input goes all choppy, so everything looks butter-smooth except for the object I'm dragging across the screen, which moves all jittery. I think the problem is that the touch input works at a different rate than the screen, as suggested here: http://answers.unity3d.com/questions/393417/camera-not-moving-smoothly-on-drag.html

Detailed version:

A few weeks ago I encountered an issue with unity that has become a big problem for me. The problem is that touch input stutters for about 5-15 seconds every couple of minutes. I've tried it on a couple of iPhones and iPads and can reproduce it 100% of the time.

Note that it's not that the frame rate drops (on the contrary, it's 60 fps all the time). The problem is that the touch input goes all jittery for 5-15 seconds and then goes back to being butter-smooth. It looks like the touch input refresh rate dropped from 60hz to 10hz for a few seconds.

This is a problem for me because in my game you're always dragging the main character across the screen with your finger, so it looks awful when the main character moves all jittery around the screen as you drag it.

This is the script:

 void Update () {
     
     if (Input.touchCount == 1)
     {
         Touch touch = Input.GetTouch(0);
         
         if (touch.phase == TouchPhase.Moved)
         {            
             Ray ray0 = Camera.mainCamera.ScreenPointToRay(touch.position);
             transform.position = ray0.origin + ray0.direction * (-ray0.origin.z);
         }
     }
 }


I think the problem is that the touch screen runs at its own refresh rate, like this thread suggests: http://answers.unity3d.com/questions/393417/camera-not-moving-smoothly-on-drag.html However the suggested solution doesn't solve the stuttering, and it doesn't make a lot of sense to me why it would.

Anyway, this is the game if you want to see why the stuttering is a deal breaker for me (though you can't see the stuttering in the video it's really apparent IRL) http://www.youtube.com/watch?v=1hOmgLBqBwQ#t=0

And you can download the project from here: http://dl.dropbox.com/s/9r4o16zcw0q8fxx/touchJitter2.zip

I'm using iOS 7 and unity 4.3.2.

Please give me a hand if you know how to solve this, I've been struggling with it for a good couple of weeks. I've tried a few different things, even smoothing the input but it still looks awful.

Thanks for reading. -Nacho.

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by justjustin · Apr 02, 2014 at 10:28 PM

Hi, I suspect the problem you are experiencing is due to a bug in iOS 7. The issue seems to, at least, be linked to the Control Center and Notification Center-- those menus that appear when sliding from the top or bottom of the screen. In my experience, once those menus have appeared it negatively affects the update rate of the touch screen in certain (or maybe all?) applications and games. Movement of the player is jerky in the games I've tested-- mostly Cave's output like ESPGaluda II and Dodonpachi games.

Try going to Settings > Control Center and disable access within apps, then reset the device (on my iPod Touch 5th gen I press and hold the home button and sleep/wake button together for about 10 seconds until the Apple logo appears). Once it finishes rebooting do not activate the Control Center or Notification center and test your game. Hopefully it will be better, or at least happen less often.

As a new user to iOS and iOS development in general this is pretty disappointing. I plan to contact Apple about it soon, as you're not the only person experiencing spotty touch controls.

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
avatar image
0

Answer by El_rika · Jan 05, 2019 at 07:01 AM

I'm playing Espgaluda 2 HD on my iPhone 5 (ios 10.3.3) and i do notice that while everything else runs at 60 fps, my character is jerky, slides at a lower framerate, and it randomly becomes smoother or less smooth (usualy after enteribg a new level). Curiously, if i drag up CC while playing the game, my character becomes PERFECTLY smoot, as it should be. How can i permanently fix this?,I'm playing Espgaluda 2 HD on my iPhone 5 (ios 10.3.3) and i do notice that while everything else runs at 60 fps, my character is jerky, slides at a lower framerate, and it randomly becomes smoother or less smooth (usualy after enteribg a new level). Curiously, if i drag up CC while playing the game, my character becomes PERFECTLY smoot, as it should be. How can i permanently fix this?!

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

21 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

Related Questions

onTouchEvent -like happenings in Unity3D 1 Answer

Touch not working on guiTexture. 1 Answer

Touch goes through UI button 1 Answer

Managing Multiple Touch Inputs 0 Answers

How to Sync the touch and animation frames? 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