[RESOLVED] how do you get the direction of a single ball in a box
im tracking a single bouncing ball in a box ,im stuck on how to get the new angle in degres or rads.
thanks
Re: how do you get the direction of a single ball in a box
If it is your program then I assume that you are making it bounce so would you not already know the angle?
Perhaps you should take the time to write a more detailed post so we can understand what you are trying to ask.
Re: how do you get the direction of a single ball in a box
If you are "tracking" it, I assume you "detect" its position.
Having the last position and the new position you can calculate the delta in the X- and Y-part of the position. Using those deltaX and deltaY the calculation of the angle is just some trigonometry.
Re: how do you get the direction of a single ball in a box
thanks thats what i did
thanks all