There are a lot of examples of analog joypad for cocos2d. But I need a simple 8-directional (8-positional) digital one.
Asked
Active
Viewed 1,843 times
2 Answers
1
Try this: http://zaldzbugz.posterous.com/first-article
It's a simple joystick for cocos2D, maybe it could help you.

Zaldy Bughaw
- 797
- 8
- 16
-
that link is a tutorial on how to use it. You can use this github link to directly download the source: https://github.com/zaldzbugz/ZJoystick – Zaldy Bughaw Apr 05 '12 at 12:51
1
Take a look at SneakyInput for cocos2D, which has both analog and D-pad implementations. If you happen to be using it already, simply set the following properties for a digital implementation:
joystick.isDPad = YES;
joystick.numberofDirections = 8; //8-directional

Ken Toh
- 3,721
- 1
- 24
- 30
-
thanks. It wasn't workable because of warnings which appear after cocos2d project creation – Gargo Mar 20 '12 at 07:16