Accelerometer

Discussion in 'iOS Programming' started by KardelSharpeye, Jun 23, 2009.

  1. KardelSharpeye macrumors member

    KardelSharpeye

    Joined:
    Apr 28, 2009
    #1
    Hello everyone,

    I was just wondering if anyone know how to offset the accelerometer so that instead of the phone being flat i want it to tilt towards the user a bit. And whatever the user does from there will affects the x/y/z position.

    Thanks in advance.
     
  2. BlackWolf macrumors regular

    Joined:
    Apr 9, 2009
    #2
    I would just display the current accelerometer values, then tilt the iphone in a position that you want to be the "zero position" and just use that for your calculations. so if you have a z value of 30, but your "zero position" z-value is 5, then it's actually 25 ... or something :D
     
  3. KardelSharpeye thread starter macrumors member

    KardelSharpeye

    Joined:
    Apr 28, 2009
    #3
    yeh i still don't get it or this is not working because i did add some extra numbers and it desont work. i think i would need to apply the angle where the user is tilting the iphone some how...
     

Share This Page