There is a little bit of play where the camera doesn't follow the player. Mario can take a few steps left or right before the camera will start following.
Develop games in your browser. Powerful, performant & highly capable.
use scrollto function to let the camera follows the player.
disable the scrollto function to stop the camera following the player.
i am unable to figure to code that mario taking a few steps before you re-enable scrollto function,
so i used x co-ordinates.
for example :
x< 400 = scrollto function disable
x>400 = scrollto function enable
Check out the "Magicam" plugin, its amazing what you can do with the camera with that.
Will look into both of these ideas. Thanks a lot!
Do you want the camera show more of the right screen when player moving right and the same idea when moving left?
If you only want the camera to be bit slow, do this:
Add a sprite and name it camera and add scroll to behavior
Every tic : camera set position to : lerp(self.X,Player.X,6*dt) - lerp(self.Y,Player.Y,6*dt)
Change the number "6" until you achieved what you want.