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 Bomzj · Dec 12, 2014 at 11:59 AM · lagjitteringvsync

sprite moves jerky no matter on frame rate

I saw many posts on that problem but nobody has a real solution (even Unity representatives keep silence). I created typical 'hello world' scene that contains only one game object with sprite and Move script attached to it (no any physics).

 class Move : MonoBehaviour
 {
     public Vector2 speed = new Vector2(-3f, 0);
 
     void Awake()
     {
         QualitySettings.vSyncCount = 0;
         Application.targetFrameRate = 30;
         
     }
 
     void Update()
     {
          Vector3 movement = speed * Time.deltaTime;
         this.transform.Translate(movement);
     }
 }

First of all, 30 fps is enough to see any movement really smooth. I played a lot of 3d action games at 30 fps and everything was smooth. Running that scene at 30 fps causes twitches/jittering. Increasing targetFrameRate to 60 or whatever higher fps makes game more stable:

1) seems less sprite jumping/jerks.

2) but new artifact appears - lags at every 1-2 seconds are happen there.

Only turning on vsSyncCount=1 (display frame rate is 60 Hz) seems makes game without jerks and lags. Strange thing is that the same 60 fps but with vsync on/off gives different experience. I can't figure out why ?

Currently I am using vSyncCount=1 which gives much better experience (seems no lags and jittering).

I want my game to run at 30 fps smoothly (it is also needed to make a game trailer as well as supporting devices where frame rate is locked to max of 30 fps and at all it should work very smooth at 30 fps). How do you guys achieve that ?

NOTE: Also noticed that sprite jerks more in Editor than in Standalone Builds. Why so ?

P.S. vSyncCount=2 produces 30 fps but game twitching.

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 davidjohn123 · Jun 27, 2017 at 01:16 PM

did you find the solution???

Comment
Add comment · Show 1 · 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 Purplepigfarm · Jan 18, 2018 at 07:29 PM 0
Share

Did YOU ever find the solution?

avatar image
0

Answer by Dray · Jan 18, 2018 at 07:39 PM

  void FixedUpdate()
  {
       Vector3 movement = speed * Time.fixedDeltaTime;
      this.transform.Translate(movement);
  }

done.


Read more here:

  • FixedUpdate

  • Time.fixedDeltaTime

  • Tutorial


cheers :)

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity 2018 Stuttering: Vsync Issue with dual monitor? 1 Answer

Why is my transform "stuttering" when I move it? 2 Answers

micro Jittering, stuttering... bug of unity? 2 Answers

Gfx.WaitForPresent is limiting fps to 30-45 with Application.targetFrameRate = 60; 1 Answer

Gfx.waitForPresent causing massive lag spikes in editor 8 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