Accelerometer Calibration

kadinshinokadinshino Member Posts: 82
edited November -1 in Working with GS (Mac)
So iv been working on a new game that uses the accelerometer to its fullest. problem is i cant seem to get a proper calibration so the user can hold the phone or ipad how they want.

So far this is how i have the code working. The user will hold the phone how they like, then push the calibrate button. this will send the current angle of the accelerometer and use it as its base value.

Change Attribute Game.CalibrateX to Game.Calibratex+GameAccelerometer = new base angle.

Problem is the game salad dosent recognize values that are less then 1. so .90 wont work when adding it.

Any ideas how to go about calibrating this in another way?

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    it doesnt work if you us a negative number?
  • kadinshinokadinshino Member Posts: 82
    nope
  • kadinshinokadinshino Member Posts: 82
    Bump. Anyone have suggestions on how the user can calibrate the angle that they hold the phone? Thanks :)
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I have a shared project (demo) called "silky smooth tilt controls" or something like that. it has a calibration system that may put you on the right track. Just search the shared projects (if that is working).
Sign In or Register to comment.