How to move the ball dependent on touch angle and make the ball reflect if it touches the wall?
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);
See Question&Answers more detail:os