Hello! I'm trying to make a 'joystick' using the mouse. I'm trying to get the mouse speed and map it to -1 to +1 for the 'x' and 'y' axis. I'm fairly certain that I can get the absolute mouse speed using
- float speed = abs(mouseX-pmouseX) + abs(mouseY-pmouseY);
but I can't use that to tell the direction, and I don't know the values I'm using to map. In addition to figuring out the speed, I'm probably going to need to use the Robot library to keep the mouse on screen, which would mean that mouseX and pmouseX etc won't work... I'm sure I could figure it out if Processing was working for me, but part of it seems to be broken. The libraries are not communicating...I'm re-downloading, but I won't be here when it finishes (and it's DLing at 5kb/s). If anyone happens to have some time and/or knows how to do this, I would really appreciate if you could share some of your knowledge. Thanks!
1