

Idea #4 in the JavaScript Idea Series – Directional Controller
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.
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.
You must be logged in to post a comment.

- Most Recent
- Most Relevant