If you test the code out, Pushing the paddle all the way up to the top of the screen, and let it go, the paddle jumps down a few pixels. And I can’t seem to figure out how to fix this. I would imagine it has something to do with the texture.
Edit: Thanks
This is what happens:
You hold the key.
The functions checks and/or adjusts the current
Y.The function updates the current
Yaccording to your key press.The current
Yis displayed on the screen.You let go of the key.
The functions checks and/or adjusts the current
Y.The corrected
Yis displayed on the screen, causing a jump from the previousY.So, you will want to update your current
Ybefore the check, not after it.