toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
Left and Right with accelerometer
Gamer61
Member
Posts:
40
January 2012
edited January 2012
in
Working with GS (Mac)
I have an actor that suppose to move when the device is tilted just not up and done how can i make an actor go right and left with the accelerometer?
Comments
App Surge
Member
Posts:
651
January 2012
In the actor you want to move left and right, use something like this:
constrain attribute self.position.x to game.accelerometer.x*600
You can replace the 600 with a different number to adjust the speed.
Gamer61
Member
Posts:
40
January 2012
Perfect thanks!
App Surge
Member
Posts:
651
January 2012
Anytime man! Glad I could help.
Sign In
or
Register
to comment.
Comments
constrain attribute self.position.x to game.accelerometer.x*600
You can replace the 600 with a different number to adjust the speed.