Reputation: 1643
I'm making a game using cocos2d-iphone, I want's to rotate a Texture2D of maybe 20 degrees, what can I do?
I tried glRotate(20.0f, 0.0f, 0.0f, 1.0f)
, but it doesn't work.
So any ideas?
Upvotes: 1
Views: 617
Reputation: 7982
Use the CCSprite property rotation
CCSprite* sprite = [CCSprite spriteWithTexture:texture];
sprite.position = ccp(100,100);
sprite.rotation = 20;
[scene addChild:sprite];
Upvotes: 4