Results 1 to 10 of 10

Thread: Ragdoll physics, line vs polygon testing

  1. #1

    Ragdoll physics, line vs polygon testing

    I am working on a ragdoll animation as part of a new game. Some of it was quite easy, I have a bunch of sticks connecting particles with rigid joints. No problem there. I can also collide the particles against a polygon. But I also need to collide the sticks against the polygon, and this is more complicated.

    What strategy would you use for that problem? (I mean, except for using Newton or Chipmunk Physics.) I have a decent line-to-polygon test, but it is hard to avoid numerical problems, roundoff problems and violent jerks in the motion. My current approach is to push the stick if there are TWO intersections.

    Any ideas? What strategy would you suggest?

  2. #2
    PGDCE Developer Carver413's Avatar
    Join Date
    Jun 2010
    Location
    Spokane,WA,Usa
    Posts
    206
    you didn't really say if it was 2d or 3d so maybe this will help.
    http://sourceforge.net/projects/pappe
    and for 2d
    http://lazarus.freepascal.org/index....c,13626.0.html
    don't know if they have what you want but perhaps they will be useful anyway

  3. #3
    Hi Ingemar, did you see this site?
    http://www.gamedev.net/page/resource...-physics-r2714

    Maybe you have, but if not, it might help

    cheers,
    Paul
    Games:
    Seafox


    Pages:
    Syntax Error Software itch.io page

    Online Chess
    http://gameknot.com/#paul_nicholls

  4. #4
    Quote Originally Posted by paul_nicholls View Post
    Hi Ingemar, did you see this site?
    http://www.gamedev.net/page/resource...-physics-r2714

    Maybe you have, but if not, it might help

    cheers,
    Paul
    I have seen it but overlooked it, since the collision response part is a bit too brief, and that's the hard part! But I have tried the demo, and it works surprisingly well! So I guess I'd better give that collision response section another try.

    And I do work in 2D. That's enough for a simple physics-based game.

  5. #5
    Thanks for the pointers! I think I have a working system now. BTW, here is the page that was my inspiration (although it lacks collision handling): http://www.aquinhasa.com/?p=56

  6. #6
    Quote Originally Posted by Ingemar View Post
    Thanks for the pointers! I think I have a working system now. BTW, here is the page that was my inspiration (although it lacks collision handling): http://www.aquinhasa.com/?p=56
    That link doesn't work for me...can't find aquinhasa.com...

    cheers,
    Paul
    Games:
    Seafox


    Pages:
    Syntax Error Software itch.io page

    Online Chess
    http://gameknot.com/#paul_nicholls

  7. #7
    Quote Originally Posted by paul_nicholls View Post
    That link doesn't work for me...can't find aquinhasa.com...

    cheers,
    Paul
    I just tried it again and it popped right up. Maybe it was temporarily down?

    I don't know if my ragdoll will ever be perfect, now I have some problems with sticks passing through polygons again, but I think it is less common than before. The big step was to add a size to every particle, so the actual point is kept outside the polygon. Then I get less problems with numerical precision, which often occurred when a particle was right at an edge.

  8. #8
    Quote Originally Posted by Carver413 View Post
    you didn't really say if it was 2d or 3d so maybe this will help.
    http://sourceforge.net/projects/pappe
    and for 2d
    http://lazarus.freepascal.org/index....c,13626.0.html
    don't know if they have what you want but perhaps they will be useful anyway
    Now, Pappe does seem interesting. But it doesn't seem to support OSX. Is it mature enough to be worth porting?

  9. #9
    Quote Originally Posted by Ingemar View Post
    Now, Pappe does seem interesting. But it doesn't seem to support OSX. Is it mature enough to be worth porting?
    I'm the author of PAPPE. PAPPE itself is fully crossplatform, only the demo examples are still win32-only.

  10. #10
    PGDCE Developer Carver413's Avatar
    Join Date
    Jun 2010
    Location
    Spokane,WA,Usa
    Posts
    206
    Quote Originally Posted by Ingemar View Post
    Now, Pappe does seem interesting. But it doesn't seem to support OSX. Is it mature enough to be worth porting?
    I had the demo up and running back when I was still windows. I would say it would be worth the work to port the demo. I have planned to adapt it to my 3.3+ frame work, but havn't gotton that far yet. it's a shame that it isn't seeing more use. most people opt for newton or bullet. perhaps that is why BeRo hasn't really done much to it in a while. I myself like the Idea of having the code vs working with a LIB. JMonkey actually ported bullet to thier engine. too bad it's java.

Tags for this Thread

Bookmarks

Posting Permissions

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