Page 1 of 1

Q3 - Semi-ragdoll effects

Posted: Fri May 16, 2014 11:20 pm
by leileilol
Theory ahead.




What if I traceline from tag_torso to tag_head and calculate off the normals it hits to change the angle of the torso? And then from tag_head upward to change the angle of the head? And then also somehow, if say the corpse is over a ledge, make it hang and get some velocity down from there?

It's not true ragdoll no, but I just want to avoid the familiar problem of torso clipping and get corpses from sticking in mid air, and make this stuff run in cgame entirely...

Re: Q3 - Semi-ragdoll effects

Posted: Fri May 16, 2014 11:55 pm
by frag.machine
Sounds feasible. But I don't know if it would look much better than say MauveBib's sagdolls.

Re: Q3 - Semi-ragdoll effects

Posted: Sat May 17, 2014 1:21 am
by Spike
you'd probably need some 45-degree constraint on the waist to avoid visible seams. I suspect ledges would just look buggy rather than simply goofy. if you can get the torso to pull the legs over the ledge then that might work, even if it slides off it.
you'd need to work with matricies instead of angles, to avoid any stray roll angles turning up. this naturally makes angle constraints a bit more awkward.
what's the plan? trace along, if it hits a wall slide along the wall for the remainder of the trace, then orient the torso along the direction from source to final trace position? would definitely work for deaths near the bottom of a slope. not quite sure if it would help when dying next to a wall though. you'd need some weird wall sliding code for that, as well as the constraint or something. imho its better to have your head in the wall than for your waist to come apart.

mauvebib's sagdolls are basically regular ragdolls, just with a separate model for each bone. its thus limited to a low bone count and can be quite ugly because of it. there's no reason the method couldn't work in q3, but I still wouldn't recommend it due to the work required to split up the models and fix all the seams. would be easier to just give the gamecode control over the bones and use some skeletal format.
you could then potentialy port mauvebib's code to position the bones(instead of entities) accordingly. just making an extension for bone control and using a sketal format would be faster+nicer than splitting up all the models into tiny parts, imho. I've not seriously looked into sketal model format use in ioq3, so I've no idea how that interacts with the existing player animation code or even if it does.