Stuttering problem when Maximize on Play
I somehow can't get a screenshot of this, so hopefully my description will help with the problem.
I'm doing a Flappy Bird clone for my class and it all checks out good when I test playing it. When I do Maximize on Play though, the bird turns into two birds side by side and starts stuttering. Almost like they switch between being transparent and solid frame by frame as the game goes by. You don't see this problem when you DON'T maximize on play though.
Has anybody encountered this before? Any general tips to help when the game is maximized?
Answer by trobinson79 · Jun 13, 2017 at 12:18 PM
I think I got it. When I disabled the below code, it appeared as one character:
// Make sure position stays within map coordinates when moving bird var v3 = transform.position; v3.x = Mathf.Clamp(v3.x, minX, maxX); v3.y = Mathf.Clamp(v3.y, minY, maxY); transform.position = v3;
My guess is it tried to clamp the bird on each frame in my Update method and it wasn't updating it in time to make the bird appear seamless.
That said, I want to keep the bird within the bounds of my camera and not fly off the screen. Any good tips for that?