[SOLVED] How to fix camera stutter?


#1

Hi. I am doing a project in which the ball moves around the stage and a camera is attached to it. Sometimes there is a FPS drawdown and the ball on the screen is twitching. How can i deal with this problem so that everything works smoothly? Link: https://playcanv.as/b/4bOTmxN6/
Use the WASD keys to control.


#2

In your FollowCamera script, change the update function to be named postUpdate to ensure it executes after the ball’s position has updated.


#3

I have little experience in development. Could you give an example or a link to a similar project? Thank you.


#4

Just follow the instructions I gave. Change:

FollowCamera.prototype.update

to:

FollowCamera.prototype.postUpdate


#5

Thanks. It really works. :slight_smile: