toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
accelerometer help
zombots
Member
Posts:
186
September 2009
edited November -1
in
Working with GS (Mac)
does any one know how i can make an actor move faster the more the phone is tilited?
Comments
CodeMonkey
Head Chef, Member, PRO
Posts:
1,803
September 2009
multiply the accelerometer value by some constant.
Atlanten
Member, PRO
Posts:
56
September 2009
Try constraining the linear velocity to the accelerometer value.
Constrain attribute: (self.Motion.Linear Velocity.X) = (game.Accelerometer.Y)*500
The accelerometer outputs a very small number. That's why it's multiplied by 500 here. Change 500 to whatever suits you.
zombots
Member
Posts:
186
September 2009
awesome that works, thanks heaps both of you:)
Sign In
or
Register
to comment.
Comments
Constrain attribute: (self.Motion.Linear Velocity.X) = (game.Accelerometer.Y)*500
The accelerometer outputs a very small number. That's why it's multiplied by 500 here. Change 500 to whatever suits you.