toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
Increment speed off of accelerometer
FallacyStudios
Member
Posts:
970
December 2011
edited December 2011
in
Working with GS (Mac)
Whats a good way to increment movement speed off of accelerometer?
Comments
StormyStudio
United Kingdom
Member
Posts:
3,989
December 2011
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...)
FallacyStudios
Member
Posts:
970
December 2011
Thanks that worked.
FallacyStudios
Member
Posts:
970
December 2011
**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.
Comments
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...)
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?