Hi.
I'm writing a game where the player tilt the phone to control a character.
The problem is: the music(when playing loud) and sound effect(like gun shots) disturbs the accelerometer values. This result in weird character movement.
Please give me some advice on how to solve this.
Thank you in advance!
...
I have been working on this for days but cannot find a solution. Pretty much my acclerometer code is causing the moving image to get stuck whenever it hits the side of the screen. It causes the user to tilt the device more than needed to get it unstuck. Hopefully someone can help me. Square is the moving image
In the viewdidload method
...
Before I reinvent the wheel I wanted to see if anyone can share code or tips for the following:
In order to get relative position of the iPhone, one needs to
Set the accelerometer read rate
Noise filter the accelerometer response
Convert it to a vector
Low pass filter the vector to find gravity
Subtract gravity from the raw reading to...