Top Down Example

19368
19369
68
69

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