dcsimg
A Flash Developer Resource Site

Results 1 to 20 of 20

Thread: ragdoll..AGAIN .fla included

  1. #1
    Member
    Join Date
    Jun 2003
    Posts
    76

    ragdoll..AGAIN .fla included

    i've been playing around with the old ragdoll source by namzorg again and modified it so the collision detection isn't height based, now it's based on actual collisions...however... the little guy seems to have epilepsy attacks most of the time and his hat jumps around wildly too

    if anyone could take a look at it and tell me how to fix this i'd greatly appreciate it

    here's a demo:
    http://ize.badne.ws/ragdoll/Ragdollv2mx.swf
    mouse to drag the little guy
    space + mousedistance = kick him
    cursor left + right to change the scene

    and here's the fla so you can take a look at it:
    http://ize.badne.ws/ragdoll/Ragdollv2mx.fla

  2. #2
    Iron Chef In-Training OpethRockr55's Avatar
    Join Date
    Sep 2005
    Location
    Kitchen Stadium
    Posts
    313
    I think I know why, but I can't tell you for sure on my present computer.

    If you wait till later today, then I might have an answer for you.

  3. #3
    Member
    Join Date
    Jun 2003
    Posts
    76
    thanks alot *waits*

  4. #4
    Iron Chef In-Training OpethRockr55's Avatar
    Join Date
    Sep 2005
    Location
    Kitchen Stadium
    Posts
    313
    Whoa! Sorry! Way late on that one, but I think I'm pretty much right. Your method only tests that the background has been hit, not like tile methods which not only tell if it's been hit, but also the direction and the penetration distance of the hit. This can cause some unpleasant things to happen when your ragdoll hits in a weird place that causes the ragdoll to collide again, and thus comes the 'seizures'.

    If you can find a way to not only determine a hit, but its penetration depth and correct it accordingly, then you might have better luck.

  5. #5
    Bacon-wrapped closures Nialsh's Avatar
    Join Date
    Dec 2003
    Location
    Houston!
    Posts
    338
    Opeth is right. You drew the stuff the guy collides with in authoring and just used hitTest to make it work. The only real solution I can think of is drawing the stuff with code; then you would have the equations of the lines and you could get something working.
    Last edited by Nialsh; 10-24-2005 at 11:32 PM.

  6. #6
    better than chuck norris
    Join Date
    Jun 2004
    Location
    West Coast of Michigan
    Posts
    668
    what about for flash 5?

  7. #7
    Iron Chef In-Training OpethRockr55's Avatar
    Join Date
    Sep 2005
    Location
    Kitchen Stadium
    Posts
    313
    What about it?

  8. #8
    hmm Pugger's Avatar
    Join Date
    Sep 2003
    Location
    Perth, Australia
    Posts
    616
    Where would you get the original source code?

    You know, namzorg's example.

  9. #9
    better than chuck norris
    Join Date
    Jun 2004
    Location
    West Coast of Michigan
    Posts
    668
    aye aye!

  10. #10
    Senior Member
    Join Date
    Feb 2005
    Posts
    1,802
    for the depth checking thingy-mabober you can try making layers. Probably better ways. maybe this link will help http://ericlin2.tripod.com/collision/bb5.html . It involves an extreemly precise hitTest.
    .

  11. #11
    Member
    Join Date
    Dec 2005
    Posts
    60
    Holy crap! I needed this file and the link is broken!! I REALLY NEED THIS .FLA FILE!!

  12. #12
    Member
    Join Date
    Jun 2003
    Posts
    76
    here you go:

    http://ize.badne.ws/rag/Ragdollv2.fla
    http://ize.badne.ws/rag/Ragdollv2mx.fla

    i didn't think anyone would still be interested in this stuff since the collision still sucks and my mathematical skills are suboptimal...so i've given up on this

    if you make any progress with it please let me know

  13. #13
    Member
    Join Date
    Dec 2005
    Posts
    60
    Thank you so much! The collision indeed sucks but we can do something about that

  14. #14
    Member
    Join Date
    Jun 2003
    Posts
    76
    many have tried...many have failed... will you be the one to fix it?
    haha

  15. #15
    hmm Pugger's Avatar
    Join Date
    Sep 2003
    Location
    Perth, Australia
    Posts
    616
    Thanks too, I've been looking for these. Vectors would be the way to fix it.

  16. #16
    Member
    Join Date
    Dec 2005
    Posts
    60
    Nope, it is not even possible to create a perfect collicion hittest function. If you paint a surface the particles cannot find a way to fit on them perfectly.

  17. #17
    hmm Pugger's Avatar
    Join Date
    Sep 2003
    Location
    Perth, Australia
    Posts
    616
    I agree. Cant be done using hittest, thats why I'm using simple vectors for collision detection.

    I suppose I can post what I have done on my experiments so far. I'm trying to make a quick efficent rag doll. You can pick em up with the mouse. Although the mouse is a bit fast so they sort of stretch, which I can fix through iterations, but that means more CPU time so screw it.

    linky: No longer

    By the way thanks for posting those two ragdolls above NoSkills helped me HEAPS! The code is so much easier to understand than anything else I've seen.
    Last edited by Pugger; 06-17-2006 at 10:22 AM.

  18. #18
    Senior Member ozmic66's Avatar
    Join Date
    Oct 2005
    Posts
    472
    very nice
    that's a lot of ragdolls

    (if thats what you want to move to flash 9, its possible, but you'd have to draw it by code and load pictures and move them around by code)
    Pixelwave Flash-based iPhone framework
    iPhone Games: Flyloop | Freedom Run

    Twitter: Oztune

  19. #19
    Member
    Join Date
    Dec 2005
    Posts
    60
    Very nice! VERY NICE INDEED!

    PS: ozmic, how's your physicsengine? Almost done? Can't wait to see more examples in flash 9 of it!

  20. #20
    anyone has a working link to the files?

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

HTML5 Development Center