Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 cocos2d-iphone 制作游戏,我想将 Texture2D 旋转 20 度,我该怎么办?
我试过glRotate(20.0f, 0.0f, 0.0f, 1.0f)了,但它不起作用。
glRotate(20.0f, 0.0f, 0.0f, 1.0f)
那么有什么想法吗?
使用 CCSprite 属性rotation
rotation
CCSprite* sprite = [CCSprite spriteWithTexture:texture]; sprite.position = ccp(100,100); sprite.rotation = 20; [scene addChild:sprite];