×

Discussion Board

Results 1 to 5 of 5

Hybrid View

  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    5

    collision detection

    Hello,

    I'm searching for some algorithms to modell some physiks and for collision detection in a 2d game. For example how to modell that a ball is hit by a paddle, has anybody some expiriences or can tell me a good link to find out something more???

    thanks

    Jan

  2. #2
    Registered User
    Join Date
    May 2003
    Posts
    1
    You can try simple rectangle intersection test, or a reduced rectangle intersection test. Google is your best friend.

  3. #3
    Registered User
    Join Date
    May 2003
    Posts
    39
    thanks lukemaung,

    but I still have a problem, with a rectangle interception test (as far as I understood) I can only test for example if a moving ball hit a resting paddle. But I want to calculate the interception between a moving paddle and a moving ball.

    For example:

    xb = vx * t
    yb = vy * t

    xp = x0 + r * cos(wp * t)
    yp = y0 + r * sin(wp * t)

    wp is the constant angular velocity

    I thougt of something like:

    (vx * t - x0)/(vy * t - y0) - 1/tan(wp * t) = 0

    ->

    f(t) = tan(wp * t) - (vy * t - y0) / (vx * t -Y0) = 0

    But I don´t think that I can solve such a equation in realtime on a mobile phone...(I think I would have to use something lika a gausian approach proceeding...).

    any idea???

    thanks

    Jan

  4. #4
    Registered User
    Join Date
    May 2003
    Posts
    3
    try "Physics for Game Programmer" by O'RIELLY it might offer some help, it has point in polygon tests and other collision detection stuff.

  5. #5
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    88
    from my point of view, one of best and easiest resource about 2D and 3D collision and physics is next
    http://www.d6.com/users/checker/dynamics.htm#samples

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •