jjzjj

rotateAmount

全部标签

iphone - 找到 Sprite 的旋转方向,即顺时针或逆时针

我一直在为此自责,因为我认为这是一个简单的问题,但不知何故我就是找不到解决方案。我正在根据触摸移动事件围绕其anchor旋转CCSprite。这是我用来旋转Sprite的代码。CGPointpreviousLocation=[touchpreviousLocationInView:[touchview]];CGPointnewLocation=[touchlocationInView:[touchview]];//preformallthesamebasicrigonboththecurrenttouchandprevioustouchCGPointpreviousGlLocation