   Creating ball's velocity by the angle
  Guys, I'm new here in the forum, I'm programming a game called billard, but now I'm stucked in this problem, when the game starts, I have to make a click once to choice the direction that the white ball will go, then the second click will choice the white ball's velocity. To choice the direction and velocity is working, but after all this steps, I want the ball moving above the table.Here is the code that I'm using to put at the ball's velocity:myBalls[15].xVelocity = acos(angle * 3.14159f / 180.0f);myBalls[15].yVelocity = asin(angle * 3.14159f / 180.0f);the angle is the direction, I think that the force I can do like this:myBalls[15].xVelocity = acos(angle * 3.14159f / 180.0f) * xBarVar;myBalls[15].yVelocity = asin(angle * 3.14159f / 180.0f) * xBarVar;the xBarVar is the value of the force, that bar force usually used in this kind of game. If I solve this problem, after I finish this game, I'll put the game on the net. I hope you understand my problem, bye.   
  You don't mention what problem you're having - what's not working as it should?That said, I'm going to guess that the use of acos/asin is part of the problem.  Those functions are the opposite of what you want - just use regular cos and sin to get the horizontal and vertical components of an angle, respectively.I also assume you handle friction in your ball update code, otherwise your ball will roll forever.If that's not the problem, can you explain what, exactly, isn't doing what you want it to, and what you've tried?   ;  Now it's working, I just changed asin by sin and acos by cos. Thanks, that's it.   