Im trying to get my player sprite to rotate towards my mouse clicks. My player barely even moves and it prints out numbers in the decimals, such as "0.000991", What am i doing wrong?
CGPoint endPoint = touchLocation;
CGPoint startPoint = _plane.position;
CGFloat angleVal = atan2(endPoint.x -startPoint.x , endPoint.y- startPoint.y );
CGFloat angle = angleVal* M_PI / 180;
SKAction *planeAction = [SKAction rotateToAngle: angle duration:1];
[_plane runAction:[SKAction sequence:@[planeAction]]];
NSLog(@"%f",angle);