Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Max-TheArgentine · Mar 09, 2016 at 01:02 PM · c#physicslag

Unity 5 stuttering

Hi guys, i have a problem. a constant stuttering of the game in play mode AND in editor mode(if i move the camera in editor mode, it will produce micro stuttering too). i dont know what to touch, what to change to eliminate this stuttering. This Stuttering appears at a fixed amount of time while in play mode, lets say ever 0.5 sec and the FPS drops from 2500 to 200 and even 40, very noticeable the micro freezes. In editor it appears when changing direction of view or pressing keys.

so far i have tried:
-Restarting the editor
-trying 64 and 32 bits
-disabling Vsync in the editor, in the Nvidia panel and both at the same time.
-Nvidia Drivers updated
- i have Windows 10 Pro 64bit, I5 4690K, GTX 970 SSC, 8Gb. i tried on my old Win 7 too with the same rig.
- I suspect, in play mode, it is something related to FixedUpdate, but it only has this line of code:

 void FixedUpdate () {
           rigidBody.MovePosition (rigidBody.position+(velocity*Time.fixedDeltaTime));
 }

In the profiler you can see spikes of 99% use of the processor by the physics engine.

- I have readed other forum posts related to this problem but i havent found a solution yet.

Here a video in play mode with the profiler
https://youtu.be/CDp62AYCnK0

HEre a little video of the stuttering inside the editor, not in play mode. https://youtu.be/cW4vAZbTmFQ

Comment
Add comment · Show 4
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 Owen-Reynolds · Mar 09, 2016 at 03:24 PM 0
Share

Does it happen in a tiny demo project? A really huge scene but with almost no scripting? When did it start? If you remove that line you suspect, does it still happen? It could be your computer, or your project is doing something to cause it ... . Seems you just have to narrow it down.

avatar image Max-TheArgentine Owen-Reynolds · Mar 09, 2016 at 07:23 PM 0
Share

Thanks for reply. It happens all the time, no matter the project. in the video example, it is a new project just to show you the problem i am facing. but it happens all the time. Some rarely times it doesnt happen. i am using a completly fresh Windows 10 installation, all updated including the drivers. it happened in Windows 7 too. It started since i installed unity 5 some months ago, it is just that i am tired of this happening in all my projects. I have some experience in unity, not thaaat big but i know more or less what i am doing, and it is very anoying not knowing what is going on here. If i delete the FixedUpdate it will happen no matter what. The worst is that it happen even when i am not in play mode. I am not using any external assets, nothing at all, just a couple of spheres, cubes, a plain. 3 materials with simple albedos, the sun light and thats it. Just for the record, the CPU and GPU temps are perfectly fine, i play demanding games without problems. Is there any kind of logs that i can check somewhere? i am at the point that i dont know what else to do :(

GFX.WaitForPresent is the responsible of the constant spikes, using like 50 or 60 ms at 99%

i can confirm it has nothing to do with FixedUpdate since i disabled the script using FixedUpdate and the problem still persist.

avatar image Max-TheArgentine · Mar 10, 2016 at 09:19 AM 0
Share

Adding more info to the problem. It is confirmed that the stuttering keeps happening even with an empty scene, the micro freeze happen exactly when a any key is pressed. FPS drops from 2000 to 15-19

avatar image Jakeiiii Max-TheArgentine · May 06, 2016 at 12:13 PM 0
Share

Have you solved your issue yet?

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by meat5000 · May 06, 2016 at 12:27 PM

Switch off Forced VSync in your NVidia control panel.

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 zorksox · Jan 26, 2018 at 06:38 AM

Try using "Exclusive Mode" in the player settings. This fixed it for me. Here is a video that outlines a bunch of potential fixes. Fixing Unity Stuttering

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

7 People are following this question.

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

Related Questions

Reduce Physics2D Lag 0 Answers

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

How can I change friction of a Physic material in script? 1 Answer

Script doesn't work with framerate drop 1 Answer


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