1

There are a lot of examples of analog joypad for cocos2d. But I need a simple 8-directional (8-positional) digital one.

CodeSmile
  • 64,284
  • 20
  • 132
  • 217
Gargo
  • 704
  • 6
  • 16

2 Answers2

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