Tilt to move?

how do you make an actor roll around the screen while you tilt the device? Kinda like the game labyrinth with the marble.
btw- I've did this before but forgot the 'code', thanks!
btw- I've did this before but forgot the 'code', thanks!
Comments
Matt
accelerate
Direction: vectortoangle(-(game.Accelerometer.Y), game. Accelerometer.X)
Acceleration: 700
It rolls the way I want it to go but how can I make it slow down when the device levels out, and speed up when the device its tilted dramatically?
Do the same for the x values too.
That should cause it to slow down.
When attribute device accelerometer x >0.5 move right
When attribute device accelerometer x < -0.5 move left
When attribute device accelerometer y >0.5 move up
When attribute device accelerometer y < -0.5 move down
for landscape switch the x and y's
move right is accelerometer is greater then .1
then the move speed can be . game.accelerometer*1500
thats like .1*1500 for the least speed and .99*1500 for the high speed when its totally tilted
idk if the gurus agree but thats what i did
that way u start moving at a very small tilt, and go pretty slow at the beginning, but u have to tilt aWHOLElot to make it go fast
when moving left u have to do game.accelerometer*-500
because the accelerometer value will be negative and u need a positive movement speed at 180 degrees
Constrain self position x to : self.position.x-(game.accelerometer.y*17)
Constrain self position y to: self.position.y+((min(.5,max(-5,(game.accelerometer.x+0))))*17
Thats landscape, figrued thats how you set it up. try that and let me know how it is
Btw john- congrats on sous chief, you deserve it!
Yeah try it out and let me know how it is. Should be good.
Thanks!
listen to the noob!
and im admitting that im a noob, so i really want some knowlage dumped on what im doing wrong