- Home /
Stuttering every 2 seconds
First of all I know there are similar questions on this forum about this. But none of them has a working answer.
We are building a side scroller with Unity3d. Our camera is fixed and the game objects are moving on the screen from right to left. We also have three layers in our parallaxing background.
Now it seems that Unity3d (and, I also read XNA?) has issues with smoot continues animation. Our gameobjects move at a steady speed, that's why every hiccup and stotter is very visible.
Every 1.5 to 2 seconds there is a visible hiccup/stutter (framedrop?). I tried everything I could find on this folum, but I simply can't believe that this cannot be fixed!
v-Sync is off, FPS is set fixed to 60, transformations is done in Update() method, with smoothDeltaTime.
PS) To eliminate the possibility of a flaw in my scripts I created an animation in a new Scene. Even this shows a stutter if the animation is smooth and lasts longer than 2 seconds.
I have added a test project for a simple example of this. [link text][1] [1]: /storage/temp/4828-testunityproject.zip
Have you tried running the profiler to see what script is causing the spike?
the question of what could be causing performance issues in your game is very broad..
if you have Pro, you could try the profiler for clues
http://docs.unity3d.com/Documentation/$$anonymous$$anual/Profiler.html
but there is just no telling without more detailed info..
Answer by Seth-Bergman · Nov 08, 2012 at 11:27 AM
hmm, I think maybe I'm getting the idea here.. how are you creating these animations? this sounds like a looping problem.. Possibly the result of animation curves:
http://docs.unity3d.com/Documentation/Manual/Animation.html
try changing the curves to "linear"
OR
if you are importing the anims from animation software, a slight "skip" might also be caused by using "loop frame"
http://docs.unity3d.com/Documentation/Manual/Animations.html
or maybe your anims just don't loop seamlessly..
Hi Seth,
The stuttering occurs wihtin the animation, before it's completed. So there is no loop or so.
does it occur at the same point in the animation each time? how are you creating these animations?
I have added an example project with two very simple animations. In my webplayer both are stuttering. But I don't have a decent PC on my work. In the windows player the moving text is stuttering. For the box, again it's not really visible.
Answer by sam32x · Nov 08, 2012 at 12:03 PM
do you have any moving objects with mesh colliders? even a 20k tri model with a mesh collider completely kills my computer.
Your answer
Follow this Question
Related Questions
Inconsistent jitter in iOS 1 Answer
How to use real vsync in Unity 3.5? 1 Answer
Stutter / Glitchy running character 1 Answer
Smoother camera in First Person Controller Prefab? 1 Answer
Can anyone maintain smooth 60fps on Android (2D) ? 0 Answers