Gargo
Gargo

Reputation: 704

Cocos2d. Digital joystick (joypad)?

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

Upvotes: 1

Views: 1849

Answers (2)

Zaldy Bughaw
Zaldy Bughaw

Reputation: 797

Try this: http://zaldzbugz.posterous.com/first-article

It's a simple joystick for cocos2D, maybe it could help you.

Upvotes: 1

Ken Toh
Ken Toh

Reputation: 3751

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

Upvotes: 1

Related Questions