This idea is about creating a directional controller or perhaps a joystick, if you prefer. This idea requires four objects to serve as directional buttons – I used triangles. I also created a small red ball and a box to serve as a boundary for the ball movement.
Each button has essentially the same code with a slight modification based on the direction of movement and size of directional boundary which is a 200 x 400 pixel rectangle in this example. Use the buttons to move the ball around the box.

I would like to hear what sorts of project ideas you have for this concept.

Preview Project

<—— JavaScript Idea Series

All Comments
Sort by:  Most Recent