toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
Can you Shake the iPod to produce sound?
butterbean
Member
Posts:
4,315
February 2010
edited November -1
in
Working with GS (Mac)
Just wondering, I did a search but couldn't find if this is enabled yet?
Comments
Eastbound
Member, BASIC
Posts:
1,074
February 2010
Seems like you would just need 1 attribute named prev_y.
Every .1 seconds, check if the accelerometer Y is .5 (or whatever amount you choose) away from prev_y, and then set prev_y to accelerometer Y.
So there's no function for shaking, but it seems like you could check for sudden jumps in the accelerometer to determine shaking.
butterbean
Member
Posts:
4,315
February 2010
Thanks guys I'll test this out later
ORBZ
Member
Posts:
1,304
February 2010
The play sound behavior has a pitch attribute. Bind that to accelerometer data.
Sign In
or
Register
to comment.
Comments
Every .1 seconds, check if the accelerometer Y is .5 (or whatever amount you choose) away from prev_y, and then set prev_y to accelerometer Y.
So there's no function for shaking, but it seems like you could check for sudden jumps in the accelerometer to determine shaking.