I've been playing around with cocos and chipmunk, and I got a demo working where I have a bunch of balls bouncing around the screen with the accelerometer.
I'm trying to figure out how to make them rotate. Graphics programming is still new to me, so I'd love some help.
Here's my update shape method. I need to get the shapes rotation and rotate the sprite with it.
void updateShape(void* ptr, void* unused){
cpShape* shape = (cpShape*)ptr;
Sprite* sprite = shape->data;
if(sprite){
cpBody* body = shape->body;
[sprite setPosition:cpv(body->p.x, body->p.y)];
}
}
Thanks