|
-
Apr 10th, 2013, 10:20 PM
#1
Thread Starter
Fanatic Member
[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
-
Apr 10th, 2013, 11:07 PM
#2
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.
-
Apr 11th, 2013, 12:33 AM
#3
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.
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Apr 11th, 2013, 01:17 AM
#4
Thread Starter
Fanatic Member
Re: how do you get the direction of a single ball in a box
thanks thats what i did
thanks all
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|