I'm new to Cocos2d and am after some help.
I have a sprite that I want to rotate 45 degrees to the left, center itself again and then rotate about 45 degree to the right. Sort of like a rocking motion.
I want this done when I touch the actual sprite, not just anywhere on the screen.
As it is right now, when I touch anywhere on the screen it rotates, 360 degrees (360 degrees for testing) but every time I tap the screen I get a new sprite.
My question is one, how do I set it up so when I touch the sprite it will perform the rocking motion that I am after? Without having a new sprite pop up each and every time I tap the screen.