top of page

Cocos2D CcAccelerometer

Ian Fan Jan 2012

Target:

Tilt the iOS device and the ball would move around properly.



Sample Code:

https://github.com/IanFan/CcAccelerometer

 

Step:

 

1. Edit AppDelegate.h, AppDelegate.m, add NavigationController for reading UIInterfaceOrientation (Support Landscape Only)


2. Set Ball.


3. Set Accelerometer and Update for controlling the speed of the ball.

Further Link:



1. Searching

bottom of page