Q3 - Semi-ragdoll effects

Discuss programming topics for any language, any source base. If it is programming related but doesn't fit in one of the below categories, it goes here.

Moderator: InsideQC Admins

Q3 - Semi-ragdoll effects

Postby leileilol » Fri May 16, 2014 11:20 pm

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...
i should not be here
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: Q3 - Semi-ragdoll effects

Postby frag.machine » Fri May 16, 2014 11:55 pm

Sounds feasible. But I don't know if it would look much better than say MauveBib's sagdolls.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
Posts: 2052
Joined: Sat Nov 25, 2006 1:49 pm

Re: Q3 - Semi-ragdoll effects

Postby Spike » Sat May 17, 2014 1:21 am

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.
Posts: 2874
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Return to General Programming

Who is online

Users browsing this forum: No registered users and 1 guest