Learn Create Your Own Split Screen

Next Page

Our hero can still wander miles off-screen.

We're going to make it behave more like a Scratch sprite, which tend to stay on-screen at all times.

We've done this before in the keydown handler, but this time we're going to alter the object itself.

This way it becomes a built-in, automatic behaviour.