Thread: 3d pong physics

  1. #1
    Registered User
    Join Date
    Dec 2002

    3d pong physics

    hey everyone. currently im making a 3d pong game. im getting to the point of writting the ball class, and have come to the conclussion that i really have no idea how the physics would work. like, how can you detect the angle of incidence and what not... and whats the proper way of reflecting the ball...

    any web sites or ideas on where to start?

  2. #2
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Northern Virginia/Washington DC Metropolitan Area
    Wouldn't the angle of incidence be related to the ratio of the vertical and horizontal components of the ball's speed? I.e. if both components are the same, a one-to-one ratio, then the ball must be travelling at a 45 degree angle. If the horizontal component is twice as much as the vertical, then the angle would be 26.56 degrees (I think) off the horizontal axis. Inv-Tangent of (1/2) = 26.56
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  3. #3
    Registered User
    Join Date
    Mar 2003
    I'll just say what needs to be done, and you can either research it further or ask me questions if you really cannot figure out what I mean:

    To start, all you need to do is when a ball collides with something, you reverse the component of the velocity which is normal to the surface being hit.

    This is called a perfectly elastic collision in which the magnitude of the relative velocities of the colliding objects stays the same.
    Last edited by Darkness; 10-12-2004 at 06:58 PM.
    See you in 13

  4. #4
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    if u want links look three threads up. Heck i even made it sticky for crying out loud.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Hi!!Regarding 3D Ping Pong 2 players
    By stylish_guy in forum Linux Programming
    Replies: 1
    Last Post: 05-12-2009, 09:01 AM
  2. 3d pong physics
    By revelation437 in forum Game Programming
    Replies: 6
    Last Post: 10-26-2004, 11:31 PM
  3. 3D starfield
    By VirtualAce in forum Game Programming
    Replies: 6
    Last Post: 06-26-2003, 12:40 PM
  4. 3D SDK for C++ programmers
    By chand in forum Game Programming
    Replies: 2
    Last Post: 05-20-2003, 07:38 AM
  5. 3d engines
    By Unregistered in forum Game Programming
    Replies: 7
    Last Post: 12-17-2001, 11:19 AM