Learn Create Your Own Split Screen

Next Page

Weird?

Not really - it's doing exactly what we told it to.

When a key goes down, the hero takes on a velocity in that direction. A different key goes down, and it takes on a different velocity.

But it has no way of losing the velocity!.

The fact the key goes up doesn't matter -- the velocity is taken on when the key goes down. The fact the key has been down means it has that velocity.

If we want it to lose velocity when the key goes up, we need to say so.