After some really cool samples earlier, these next few samples will be much less interesting to established Corona devs but still of interest to new comers. The eighth entry into my Corona samples is a basic analog joystick which responds to touch control.
There isn’t much to see here visually – other than a small virtual analog stick in the lower left corner. In this demo, you can use this to control the speed and direction of the ball. There is no acceleration or physics applied to the ball – it simply moves in response to your analog input.
I decided to keep the joystick class simple to allow for easy expansion as building a joystick class to fit all situations leads to a lot of bloat. This does the job nicely and can support images for use instead of the vector objects.
You can download the source here: [Download]