Here's a clean, simple analog stick (joystick) module for your convenience -use it anywhere and anyhow you like to.
- Create an unlimited amount of analog sticks at once
- Retrieve angle, distance, strength of each stick
- Move your character using a single line only ( MyStick:move() )
- Slim and clean code, easy to customize or extend
- Snaps back smoothly when released (slow-down)
- Working sample included (runs out of the box, no graphics required)
How-to sample code (copy & save as "main.lua")
1
| local StickLib = require("lib_analog_stick") |