- Home /
2D Character jittering after build. (Unity 5)
I'm making a 2D platformer with a rigidbody2D character that the player controls. The horizontal movement is handled by translate while jumping is handled by the velocity.y of the rigidbody2D. The character acts normal when in the editor, however after building the game it starts acting odd. If I jump up and the character is just moving up it acts normal. However if I try to move right or left while in the air the character seems to jitter.
The problem is worse if I change the graphics to "fastest", in that case the character hovers above the ground if I move left or right and just moves down slowly. I get the same errors if I simply run off a ledge (ergo, without jumping).
Also, while I usually don't get the issue in the editor, if I set it to run "fastest" in the editor quality settings, I get the same error in the editor as I did after building it and running "fastest". The issue goes away in the editor if I turn off V sync on "fastest"'s settings, however it still jitters after being built.
I have a hunch that the issue has to do with my recent installation of Unity 5. I hadn't yet built the game before upgrading it to Unity 5, so I can't know for sure, however I've made other platformers using basically the same method in Unity 4 and never had this issue.
Thanks for any help!
Same Here. I updated to Unity 5 from 4. $$anonymous$$y Whole 2d Game broke, the player was screwed even more.
I still haven't gotten it to work.
Update: Alright so I tried changing all the scripts to "fixedupdate" and now the movement works fins with Vsync turned off, as opposed to before where turning Vsync off made it worse. However, with Vsync on the problem is still just as bad? It's really odd. I can't keep Vsync off because it makes my input not work, so does anyone know how to solve this problem?
The way i fixed it was to stop the errors, i just fixed the problem. But i also tried the game on my $$anonymous$$ac (4gb ram 2.4ghz). Works fine with errors No lag.
But my Ga$$anonymous$$g Pc (Developing Pc) Has 16gb ram, 3.9 octo core. It lags. It seems like a unity problem.
Once i fixed the errors all lag stoped.
What do you mean "fixed the errors"? I think we're probably suffering a different problem since I just found an older build of the game from before Unity 5 and it had same problem. I just fixed it by turning off interpolation.
I had an error saying, animator has not been initialized. I got 1000 errors in like 5 seconds. It was slowing down my untiy.
Answer by Jokeman258 · Mar 14, 2015 at 01:30 AM
FIGURED IT OUT. Okay so basically after literally deconstructing and reconstructing my entire script to try and fix this, it turned out all i had to do was turn off interpolation. I must have turned it on at some point by accident. It's actually kind of weird that this fixed the problem since according the the unity manual, jittery character movement is exactly what turning interpolation ON is supposed to fix.
I have no idea what that means, i'm brand new to game making but. Cool you fixed your problem. I assume unity will fix that error lag bug soon anyway.
Your answer
Follow this Question
Related Questions
Gravity Direction Change 2D 1 Answer
[2D] Sprite flickers/is choppy when moving 1 Answer
Unity2D game objects don't collide 1 Answer
Unity 2D addforce problem 1 Answer
Rigid Body Movement (Mobile Issue) 3 Answers