-1
如何根據接觸角度移動球,並在球碰到牆時使球反射?查找球的目標位置
CGFloat diffX = ballImg.position.x - tchLoc.x;
CGFloat diffY = ballImg.position.y - tchLoc.y;
CGFloat angleRadian = atan2f(diffY, diffX);
float angleDegrees=CC_RADIANS_TO_DEGREES(angleRadian);
你找到解決方案嗎? – Sarah