Accelerometer.. Right / Left / STRAIGHT???
SaveDave
Member Posts: 140
I have a ball that moves left and right dependent on the tilt of the device. This is controlled by using the < and > 0 to decide if it goes left or right.
How can i also have an option for it to settle in the middle rather than continuing its movement to the opposite side. I do however NOT want the ball to come to a sudden stop but rather slowly decelerate.
Ive tried a few methods, none that i think up seem to work well though.
any help would be great.
How can i also have an option for it to settle in the middle rather than continuing its movement to the opposite side. I do however NOT want the ball to come to a sudden stop but rather slowly decelerate.
Ive tried a few methods, none that i think up seem to work well though.
any help would be great.
Comments
"Hello guys tshirtbooth here"
to make the ball slown down instead of coming to a complete stop
when accelerometer y is < 0.1, and accelerometer y is > -0.1
interpolate self motion linear x or y to 0.
Thats for landscape mode
"And that's all you need to know, aboot........in Gamesalad"