Ragdoll Physics

Seriously though, I can't get it to work. When I run it like that, it just goes crazy and flies off screen even if I'm clicking and dragging (which sets the position of the anchor circle). I just don't get it. It obviously works for you and Jake, but my code just doesn't want to work or something. I still have my particles that seem to like me a little but I would like to get some ragdolls or cool things using this technology.

If anyone on a Mac can download the source (get it here) and try to get it working and let me know what you had to change to get it working, I would greatly appreciate it.

Don't be sorry. You helped me tons. Even if for some reason it won't work. I'll just wait for someone to have that revelationary (is that a word?) moment and realize something that will completely fix this. Now I must go back up my hard drive and reformat and reinstall Mac OS X because something got screwed up and the comp needs it.

It's the trouble of coding physics. I remember when I was trying to put the balls into a shape.

Well I tried 6 months ago for 3-4 days and didn't manage, so incredibly frustrated I gave up, then I tried 3 months ago and still didn't, finally I tried again 1 month ago and I managed so I could do ragdoll masters

ok, I made one in blitzmax, so I'm sure that works. Useless to say, I did put in about 5 bugs that took me about 15 minutes fo find, despite it's only 40 lines and relatively simple, and despite I consider myself a bit of an expert after all I've been through.

I think I'm doing the for() loops wrong. I need some help with my C/C++ (kinda sad). I have an array declared like

Code:

SEVector circlePos[NUM_CIRCLES];

and later I want to change all the positions. What should the for loop condition be? What if I don't want to change the last one entry? I believe that changing all of them (without going out of bounds) would just be i < NUM_CIRCLES because then I would never be NUM_CIRCLES and thus would be one lower and a correct value. Therefore, to change all but the last, should it be i < NUM_CIRCLES - 1? The problem is that never seems to leave the last one alone.

Nick Wrote:I think I'm doing the for() loops wrong. I need some help with my C/C++ (kinda sad). I have an array declared like

Code:

SEVector circlePos[NUM_CIRCLES];

and later I want to change all the positions. What should the for loop condition be? What if I don't want to change the last one entry? I believe that changing all of them (without going out of bounds) would just be i < NUM_CIRCLES because then I would never be NUM_CIRCLES and thus would be one lower and a correct value. Therefore, to change all but the last, should it be i < NUM_CIRCLES - 1? The problem is that never seems to leave the last one alone.

Loop through entire array:
for(int i = 0; i < NUM_CIRCLES; i++)

Loop up to (but not including) the last slot
for(int i = 0; i < NUM_CIRCLES - 1; i++)

There was a long silence...
'I claim them all,' said the Savage at last.