我正在试着做我的精灵脸,并在它移动时跟随一个接触点,到目前为止我已经成功了。基本上,每当用户触摸屏幕时,我的sprite都会旋转以面对触摸点,并朝向触摸点。下面是我的基本代码:
-(void)handlePan:(UIPanGestureRecognizer *)recognizer{
//calculate tapPosition + angle, then rotate the sprite and move it to the tapPosition:
[fish runAction:[CCRotateTo actionWithDuration:0 angle:ang