How would I make the camera only follow mySprite horizontally?

If you have a solution, that would be cool!


You could set the camera X to the sprite X!

1 Like

center camera at x mySprite.x y 60 ( any fixed number)


It’s very choppy though.

1 Like

This is a scenario where on game update would work better actually:


reason being that forever spins up a separate thread to run the code in, so it will always be ‘1 render’ behind / potentially could miss a frame depending on timing a bit; since this is code we want to update synchronously it’s better to update it with on game update where it will always start and finish before we actually render to the screen (a little bit of documentation on this for anyone interested here:

Alternatively, we use my sprite utils extension ( which has a block to run at certain parts in the game loop if you care about the exact timing when something should run, but on game update should generally handle these types of things well