The accelerometer picks up force even when my iphone is sitting flat on my desk. Normally this wouldn’t be a huge issue since the changes are so small, but the lack of anti-aliasing makes the jitter very apparent when the accelerometer data is applied to translation of a 3d model. Is there an efficient way of removing the jitter? I’ve tried averaging the accelerometer data over 6 frames. This reduces the severity of the jitter, but doesn’t stop it entirely.
Try googling for code for a “low pass filter”.
If it’s practical for your application, you might try adding a rigid body to your object and applying a force to it based on the accelerometer value. That seems to filter it pretty well.
Don’t the unity iphone docs include a sample of a low pass filter?
Low pass filter. That’s the term I was looking for. I found the doc on that, thanks guys.
file:///Applications/Unity%20iPhone/Documentation/Components/Advanced%20Unity%20iPhone%20Tips.html