0 for x corresponds to the joystick tilted all the way to the left while 100 corresponds to the joystick stick tilted all the way to the right.
0 for y corresponds to the joystick tilted all the way down while 100 corresponds to the joystick stick tilted all the way forward.
What ports can I use it on?
1,7
Code
var xMovement = Magic.modules.joystick.x;
using Magic;
public class Demo : MonoBehaviour
{
// create a reference to the module
public Magic.Modules.JoystickModule joystick;
void Start()
{
}
void Update()
{
// access the property of the module
int xMovement = joystick.x;
int yMovement = joystick.y;
}
}