Simple Angle Joystick
Starting with the simplist input the static floating thumb stick is a quick design. Best used for an angle applied to a flat value input. Use of distance is unreliable due to the DPI of various devices. Games best use are those that only require direct map of 1:1 direction to angle. This joystick is very straight forward, but sets the fundamental grounds for the others.
What to use
* Pad sprite for a visual cue.
* Stick sprite to track input. Requires the Drag and Drop behavior.
* Variable(conAngle) to store the angle for convenience.
How it works
The first event checks to see if the thumb stick is being dragged. When this is happening the "control angle" variable is being set to the current angle. This is convenience for use rather than constantly using the angle() function.
A Note on Angle
Angle is related to Pi. Due to this there is no zero angle when using numbers. Though the the samples use a set 0 value for angle the best practice is to not use angle at all if there is no active input.