Simulate a virtual joystick using accellerometer data
Reading acceleromenter data is quite easy on the Iphone but using them effectively to simulate a virtual joystick is a different story. I see that accelerometer data are quite noisy and the average module of each axis accelleration in a rest position is not comparable. I wonder if the most effective way to use accelleromenter is to look at the derivative of each measurement to identify the moment at which there is a change in direction. Is there anyone that can suggest an effective way and/o开发者_StackOverflowr strategy to use accellerometer to simulate a joystick? Thanks, Luca
If you take a look at the analog joystick reading it will be even worse :) ... anyway, just started similar project so I'll keep you posted
You can reduce the "noisiness" by averaging out the accelerometer update over sone number of updates, say every ten. This average will update every time accelerometer does, but will be far more "natural" feeling, much less frenzied or noisy.
精彩评论