Re: swinging tyre -- ragdoll is EASY! ;)
Posted by robdood on
Sun Dec 19th 2004 at 5:25pm
7 posts
1 snarkmarks
Registered:
Dec 15th 2004
Occupation: bum
Location: UK
Got a tutorial for doin the ragdoll on a rope tied to a tree thing, and have tried to recreate a similar affect with a tyre (using a phys_constraint instead of a phys_ragdollconstraint). However for some reason it just doesnt work at all! So I would like to ask you kind folks:
1. Can I do this using a phys_constraint? At the moment it seems the tyre is fixed in space. It rotates when i walk into it, but then resets position. If I shoot it, nothing happens.
and then...
2. I have changed it to a phys_ragdollconstraint and it kind of works, except it only seems to swing in a small angle of direction, as thought there are invisible walls around it.
and finally..
3. The ragdoll demo I have seems ok, but the body (and especially the rope) doesnt flail around as freely as the one at the beginning of the Ravenholm chapter in HL2.. any help?
I'm planning on making a 1-player mod and need as much help as possible in regards to making cool stuff. Valve didnt use swinging stuff NEARLY enough :smile:
Re: swinging tyre -- ragdoll is EASY! ;)
Posted by robdood on
Mon Dec 20th 2004 at 11:10am
Posted
2004-12-20 11:10am
7 posts
1 snarkmarks
Registered:
Dec 15th 2004
Occupation: bum
Location: UK
Right, well thanks for the link, but I've already been using that site.. I tried with a phys_ballsocket but it still doesnt work :sad: I can make it look like it swings, but its not right for sure: the tyre just swings around the ballsocket, its like i need the phys_ballsocket to move with the rope..
But I have no clue how to do this! Help! Someone must know!
I think I'll need a ballsocket type swing between the two ends of the rope, with a ballsocket connecting the end of the rope and the tyre.
But what i find confusing is I'll need to attach the end of the rope to the second ballsocket in order to make it swing with the rope, but the rope needs to use the tyre to work out where its supposed to be! Aaaargh please help me someone!
Re: swinging tyre -- ragdoll is EASY! ;)
Posted by Rof on
Mon Dec 20th 2004 at 5:34pm
Rof
member
210 posts
41 snarkmarks
Registered:
Dec 3rd 2004
I think you just need a phys_lengthconstraint. Place it it at the top
of the rope, and drag it's helper-circle to the bottom of the rope
(where it attaches to the tyre). Then make sure that the
phys_lengthconstraint has the name of the tyre entity in it's "Entity
2" field. That should be it.
Phys_ballsocket I've had very little luck with using. It seems that it
won't move with an object even if you use both the Entity 1 and Entity
2 fields, i.e. it just sits frozen in space and lets the attached
entities pivot around it. Doesn't seem to be very useful.
Re: swinging tyre -- ragdoll is EASY! ;)
Posted by robdood on
Tue Dec 21st 2004 at 3:53pm
7 posts
1 snarkmarks
Registered:
Dec 15th 2004
Occupation: bum
Location: UK
So all I need to do is create a rope with the second part attached to a tyre, and the phys_lengthconstraint. How should I attach the tyre? Should it be thru the Parent field on the 2nd rope_keyframe or should I use a logic_measure_movement?
Gonna go play with this now.. :smile: yay hope it works
Edit: also, the phys_ballsocket works just like a phys_ragdollconstraint - it attaches an object to that point in space. But there MUST be a way of attaching the constraint to the rope just like the tyre, as if I could get the contraint itself to swing, then I could get a proper swinging ragdoll/tyre
Re: swinging tyre -- ragdoll is EASY! ;)
Posted by robdood on
Tue Dec 21st 2004 at 5:11pm
7 posts
1 snarkmarks
Registered:
Dec 15th 2004
Occupation: bum
Location: UK
Yay it works at last. Still a bit buggy and (sometimes RIDICULOUSLY) bouncy, but still.. So for anyone else who'd like to know:
1. Create 2 keyframe_ropes. Call them something like rope1 and rope2. Set rope1's Next Keyframe field to rope2.
2. Create a prop_physics, make it whatever you like, name it, eg tyre. Set rope2's Parent field to tyre.
3. Create a phys_lengthconstraint, set its Entity1 field to rope1, Entity2 to tyre.
And thats it. You should get a nice swinging object that will properly work, though it will fly a little madly sometimes. I've tried playing with the phys_lengthconstraint's fields for Additional & Minimum Length , but it can be quite mad. I tested with Additional length 5 and Min Length 0 and it worked nicely
Re: swinging tyre -- ragdoll is EASY! ;)
Posted by Guessmyname on
Tue Dec 21st 2004 at 7:31pm
342 posts
173 snarkmarks
Registered:
Dec 6th 2004
shouldn't it be a move_rope and a keyframe_rope?
Re: swinging tyre -- ragdoll is EASY! ;)
Posted by synax on
Tue Dec 21st 2004 at 8:54pm
synax
member
16 posts
2 snarkmarks
Registered:
Dec 16th 2004
And shouldn't it be tire?
Re: swinging tyre -- ragdoll is EASY! ;)
Posted by Dred_furst on
Tue Dec 21st 2004 at 9:07pm
455 posts
135 snarkmarks
Registered:
Sep 3rd 2003
Location: UK
and why a physconstraint? the rope has a max length anyway,
Re: swinging tyre -- ragdoll is EASY! ;)
Posted by Rof on
Tue Dec 21st 2004 at 10:16pm
Posted
2004-12-21 10:16pm
Rof
member
210 posts
41 snarkmarks
Registered:
Dec 3rd 2004
The rope's max length is just for visual effect (slack, etc.) Ropes
don't constrain objects in any way, they'll stretch indefinately. You
need some kind of physics constraint (usually a phys_lengthconstraint)
in addition to the rope to get both a physical effect and a visual one.
BTW, in case someone's trying to do this in CS:S, at last notice
move_ropes and keyframe_ropes don't work well when parented to moving
objects (but only in CS:S, works fine in HL2 or HL2DM). So you have to
play awkward tricks to get them to behave properly.