Increment speed off of accelerometer

FallacyStudiosFallacyStudios Member Posts: 970
edited December 2011 in Working with GS (Mac)
Whats a good way to increment movement speed off of accelerometer?

Comments

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    if accelerometer y > 0.1
    Change speed to 10


    if accelerometer y > 0.3
    Change speed to 30

    if accelerometer y > 0.4
    Change speed to 50

    etc... not sure if the numbers are correct, or it you want x or y...but you get the idea..

    I'm sure someone could post the formula so you could do it all in one rule...

    i.e.

    constrain speed to (accelerometer y) * 150

    (so the speed goes up the more you turn the device...)
  • FallacyStudiosFallacyStudios Member Posts: 970
    Thanks that worked.
  • FallacyStudiosFallacyStudios Member Posts: 970
    **Aside from the original question**

    How could I make a "balance bar" where the person needs to balance based off the accelerometer. For example it starts leaning to much to the left so you lean it right to hold balance? Any ideas?
Sign In or Register to comment.