0

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?

4

1 回答 1

1

您需要为此设置过滤因子。请查看http://www.raywenderlich.com/3611/how-to-make-a-space-shooter-iphone-game上的教程,其中介绍了如何使用加速度计进行此类运动。

于 2013-04-22T01:20:39.983 回答