私は現在、このコードを使用して CCSprite (プレーヤー) オブジェクトを回転させ、最後のタッチに直面させています。問題は、これにより回転がかなりビクビクし、あまり滑らかに見えないことです。
CGPoint playerPos = [player position];
CGPoint diff = CGPointMake(currentPoint.x-lastPoint.x, currentPoint.y-lastPoint.y);
CGPoint playerNewPos = ccpAdd(playerPos, diff);
[player setRotation:-CC_RADIANS_TO_DEGREES(atan2(playerNewPos.y-playerPos.y, playerNewPos.x-playerPos.x))];
このコードをより滑らかで流動的にするにはどうすればよいでしょうか?
CCRotateTo も使用してみましたが、同じ問題が発生しています。
前もって感謝します