0
votes

In my cocos2d game I would like to use tilt controls. The game is in landscape left only, for keeping it simple.

Now, if the user tilt device backwards, eg, tilt the screen upwards, the player sprite is moving up(+y). If the tilt is in the other direction(turning screen downwards) the sprite moves down. -(y)

The problem is that the device is pretty much in downward tilt from start and the player sprite moves down quickly. To get it moving up I have to tilt the device so far that I canĀ“t see the screen.

So is there anyway to make the tilt less/more sensitive based on what direction the said tilt is?

1

1 Answers

1
votes

You need to set a filtering factor for this. Take a look at the tutorial at http://www.raywenderlich.com/3611/how-to-make-a-space-shooter-iphone-game which goes through how to use the accelerometer for this type of movement.