I appreciate all the feed back. But the reason I wanted to use angles, is to control the direction of where the ball goes based on the speed of the paddle. In psuedo, this is what I am trying to do...
var tempSpeedX:Number = xspeed;
var tempSpeedY:Number = yspeed;
var tempDirY:Number = yDir * -1;
tempSpeedY = tempSpeedY * tempDirY;
var angle:Number = Math.atan2(tempSpeedY , tempSpeedX );
//angle = angle + ( paddle.cspeed * .4 );
xspeed = Math.cos(angle);
yspeed = Math.sin(angle);
trace(xspeed);
trace(yspeed);
yDir += tempDirY;
isHit = false;
tempSpeedX, tempSpeedY, and tempDirY are temporary variables used to hold my ball's x and y velocity. tempDirY is used to hold my Y axis direction. Either -1 or 1. What I am doing is trying to recreate the new angle.
Lets say the ball is moving at vx = 3, vy = 3. I know upon impact that ball will be heading at that direction. So what I do is flip the Y axis and get angle. That is what the following code does
tempSpeedY = tempSpeedY * tempDirY;
I take the current direction and multiply it by the speed to flip it going the other direction. What I do next is get the angle using atan2
var angle:Number = Math.atan2(tempSpeedY , tempSpeedX);
Once I get the new angle, At this point in time. I could alter the direction to where I want the ball to go based on my paddle.speed. where it is commented out I put code to alter the direction. I then would put it back to normal angle by using sin and cosine. then at it back to xspeed and yspeed. but this code doesnt work. not sure whats wrong.
I know what I am doing is little too complicated because of my lack of knowledge in physics. But the basic way is causing too many complication that I cant really explain it.
Lets say that the old way , the ball doesnt move in the direction the paddle is trying to take it. xDir is constantly flipping back and forth from -1 to positive makeing the speed flip back and forth from negative to positive. my paddle moves back and forth so that speed is negative and positive. and therefore sometimes the directions dont go they way they are suppose to. so I am trying to think of a better way of controlling the ball with the paddle