Game Development Reference
In-Depth Information
1. We need to make the player move with the WASD control and rotate to the mouse
location. Click on the player and add the behavior.
2. Once you see this dialog box, click on the plus sign to add a behavior.
3. Scroll down and add the 8Direction behavior:
4. Once you have added the 8Direction behavior, it should appear just like the pre-
ceding screenshot. Exit this window and go to the layout.
What we want is for the player to use either the arrow keys or the WASD controls to move
around. It's good to have both, as players have different preferences. The following are the
steps to do so:
1. First, we have to change the eight directions to four. You can have a game with
the full eight directions, but four is a little easier to manage programmatically.
2. Select the box next to 8 directions and change it to 4 directions , as shown in the
following screenshot:
3. We also need to make sure that the angle will be determined by the mouse and not
the 8Direction behavior. From the Set angle dropdown list, select No as shown in
the following screenshot:
Search WWH ::




Custom Search