Top Down Example

18007
18008
53
54

Move the player using the arrow keys.

The Player object is moved by setting its Velocity property directly. The velocity is set when a key is pressed, and reset to 0 when released.

Setting the velocity is preferable to setting the position directly, because this allows the collision detection to prevent the player from penetrating other objects.

Editor