|Topic was automatically imported from the old Question2Answer platform.
I have a
Camera2Dattached to my Player, which is essentially just a
KinematicBody2D. I have all of my movement code in
_physics_process(), which is called directly from the
When I run in one direction, I notice a kind visual stutter on everything in my scene except my sprite. It’s as if the entire screen is shifted left or right for a split second and then shifted immediately back. I’m not able to capture it adequately in a video.
I notice this happening regardless of whether or not I have
smoothing enabled, as well as whether or not I have
hidpi enabled. I also notice it in both fullscreen and windowed mode. I even tried exporting my game to Mac OSX, but it’s present even in the exported version. I even tried rounding the Player’s position to integers, but no luck.
What might be causing this stuttering?
Because it’s happening to the background and not the player sprite itself, I don’t think it’s related to these:
_physics_process() to handle your character’s movements. This function is specialised for the physics because it uses a delta who never varies.
If you already using it : From where are you calling the movements ? Directly from the character’s node ? If not, maybe the function relay isn’t well processed by the engine.
Thanks for the suggestions. Unfortunately, I already use
_physics_process() and call from the Player node itself. I’ve updated my question to reflect this.
Diet Estus | 2018-07-02 14:21
By the way I think I noticed what kind of stuttering you’re talking about. I can’t figure out what’s causing it but I got a similar problem on a blank project : You go in one direction just fine and then the screen starts to “shake” around your sprite during half of a second and then goes back to a smooth scrolling ? And it seems to happen periodically when you keep moving ?
Very annoying, I agree. If you manage to find the cause before me, please share
Yes, you seem to be describing exactly what I’m experiencing. There’s a lot of stuff on the web about visual stuttering in Godot, but it’s hard to tell if what others are describing is the same issue. As I mentioned, I seem to notice it not so much on the player Sprite itself, but on everything else in the scene. I will keep searching for a solution.
Diet Estus | 2018-07-02 20:09