change size related to accelerometer value problem

POMPOM Member Posts: 2,599
edited November -1 in Working with GS (Mac)
hey all
im trying to make an actor do an action(change size) depending on how much the accelerometer is tilted, so the more it tilt- the more the actor is growing, and if its less tilt- the actor is reducing to its normal size.

im trying to make an actor that moves related to the accelerometer, and capture its velocity to an attribute and then using this attribute value to make the change size action.

is it the right way to do it?
im not having a success yet, hope you can help me guys

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    someone here made a free iphone app called iDevices. It simply gives you data like the values for X,Y,&Z when tilted. I would get this app and figure out how to use those numbers as part of an equation. It could be as simple as constrain self.width and self.height to 100*game.accelerometer.X. But I would get that app and look at what the numbers will be when you tilt the phone so you can get exactly how you want it.
Sign In or Register to comment.