Results 1 to 4 of 4

Thread: [RESOLVED] how do you get the direction of a single ball in a box

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2009
    Posts
    573

    Resolved [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

  2. #2
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    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.

  3. #3
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    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!

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2009
    Posts
    573

    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
  •  



Click Here to Expand Forum to Full Width