I understand that many people have had issues connecting two actors together using KConstraints. The general concensus seems to be that it's just not possible. I have tackled the problem on my own and come up with some promising material. I am, however, out of ideas and only have a partially working solution. It's sort of like a proof of concept.
Here's what I've been able to accomplish so far (UT2004 - v3270):
***From within UnrealED:
*Imported an SVehicle (the ONSRV).
*Make sure the Physics is set to PHYS_Karma.
*Imported the KarmaTube as a ragdoll (from the UDN Karma tutorials).
*Imported custom characters as ragdolls (generic builds - nothing especially custom).
*Used KBSJoints to connect the tube and characters to the vehicle.
*Make sure the Physics is set to PHYS_Karma.
*Set all KStartEnabled variables to "True".
*SPECIAL NOTE: The actors won't connect to the vehicle unless the bKDoubleTickRate variable in KarmaParams for all actors involved is the same. Either false or true. I set them all to "True" because SVehicles benefit drastically from the bKDoubleTickRate option. Be careful with this, though, as it can drastically slow down the system with too many actors frequently colliding.
OUTCOME:
I was able to run to the car, get in it, and then drive around with the tube swinging behind me and two characters (attached to the wheel axels) dragging behind. When I stop the car, the ragdolls continue to move and can cause my car to flip over (if they have enough combined momentum). It's actually pretty neat: it looks like "Just-Married" cans except it's humans! Heh...
***From within Script
(This is a custom designed trigger - use a generic trigger to cause an event that causes this trigger to trip.)
*Spawned a weapon.
*Gave said weapon to the player (using the GiveWeapon function).
*Gave the weapon some KarmaParams.
*Set the physics of the weapon to "Karma" (yes, you can do this... the weapon is the first-person model).
*Using the 'edfindable' modifier, I 'found' a reference to the Tube ragdoll.
*Spawned a joint (my own class - KBSJoint subclass with bNoDelete set to false by default).
*Set the Joint's two KConstraintActors to the Tube and the player's weapon.
*Set the Joint's physics to PHYS_Karma.
*Called KUpdateConstraintParams() on the joint.
OUTCOME: When I hit the trigger, the player gets the weapon and the Tube ragdoll twitches a little. One of the joints (the one closest to the player) gets 'kinked' and becomes locked at one angle. Repeated trips of the trigger cause the Tube to become, joint by joint, more tense... all the while jumping around (which causes the ONSRV to buck like a bull). After I've hit the trigger once for each bone in the tube, the Ragdoll is destroyed (log told me so) and a new one is put in. Trip it again and it will crash the game. This isn't of much concern to me for the long run... I'm just playing right now.
So basically I've gotten to the point where it looks like things get connected briefly and then something goes wrong. As I understand it, KConstraints rely on two things: actors with Bones and PHYS_Karma or PHYS_KarmaRagdoll Physics. The *only* explanation I have for the system breaking is that the weapon's physics may somehow be reverting to PHYS_None or something. In checking the actors variables through "EditActor class='WeaponName'" I haven't noticed a change but I'll try to look into it further.
Dynamically created joints SHOULD work. They work in KCars for the wheels. I tried KCarWheelJoints for my spawned joint but that didn't change anything. The desired outcome is to get two my player's weapon (and, by extension, the player) tethered to the tube. This SHOULD work in theory as I can 'pin' the tube to the world (the one attached to the car), get in the car and attempt to drive. Everything works, I just can't go beyond the length of the 'leash' I created.
Anyone see anything? Have any ideas? I'm going to keep working at this but if anyone has any input, that'd be sweet. Thanks!
I can probably post pictures if you need a better idea of what I'm trying to say...
Here's what I've been able to accomplish so far (UT2004 - v3270):
***From within UnrealED:
*Imported an SVehicle (the ONSRV).
*Make sure the Physics is set to PHYS_Karma.
*Imported the KarmaTube as a ragdoll (from the UDN Karma tutorials).
*Imported custom characters as ragdolls (generic builds - nothing especially custom).
*Used KBSJoints to connect the tube and characters to the vehicle.
*Make sure the Physics is set to PHYS_Karma.
*Set all KStartEnabled variables to "True".
*SPECIAL NOTE: The actors won't connect to the vehicle unless the bKDoubleTickRate variable in KarmaParams for all actors involved is the same. Either false or true. I set them all to "True" because SVehicles benefit drastically from the bKDoubleTickRate option. Be careful with this, though, as it can drastically slow down the system with too many actors frequently colliding.
OUTCOME:
I was able to run to the car, get in it, and then drive around with the tube swinging behind me and two characters (attached to the wheel axels) dragging behind. When I stop the car, the ragdolls continue to move and can cause my car to flip over (if they have enough combined momentum). It's actually pretty neat: it looks like "Just-Married" cans except it's humans! Heh...
***From within Script
(This is a custom designed trigger - use a generic trigger to cause an event that causes this trigger to trip.)
*Spawned a weapon.
*Gave said weapon to the player (using the GiveWeapon function).
*Gave the weapon some KarmaParams.
*Set the physics of the weapon to "Karma" (yes, you can do this... the weapon is the first-person model).
*Using the 'edfindable' modifier, I 'found' a reference to the Tube ragdoll.
*Spawned a joint (my own class - KBSJoint subclass with bNoDelete set to false by default).
*Set the Joint's two KConstraintActors to the Tube and the player's weapon.
*Set the Joint's physics to PHYS_Karma.
*Called KUpdateConstraintParams() on the joint.
OUTCOME: When I hit the trigger, the player gets the weapon and the Tube ragdoll twitches a little. One of the joints (the one closest to the player) gets 'kinked' and becomes locked at one angle. Repeated trips of the trigger cause the Tube to become, joint by joint, more tense... all the while jumping around (which causes the ONSRV to buck like a bull). After I've hit the trigger once for each bone in the tube, the Ragdoll is destroyed (log told me so) and a new one is put in. Trip it again and it will crash the game. This isn't of much concern to me for the long run... I'm just playing right now.
So basically I've gotten to the point where it looks like things get connected briefly and then something goes wrong. As I understand it, KConstraints rely on two things: actors with Bones and PHYS_Karma or PHYS_KarmaRagdoll Physics. The *only* explanation I have for the system breaking is that the weapon's physics may somehow be reverting to PHYS_None or something. In checking the actors variables through "EditActor class='WeaponName'" I haven't noticed a change but I'll try to look into it further.
Dynamically created joints SHOULD work. They work in KCars for the wheels. I tried KCarWheelJoints for my spawned joint but that didn't change anything. The desired outcome is to get two my player's weapon (and, by extension, the player) tethered to the tube. This SHOULD work in theory as I can 'pin' the tube to the world (the one attached to the car), get in the car and attempt to drive. Everything works, I just can't go beyond the length of the 'leash' I created.
Anyone see anything? Have any ideas? I'm going to keep working at this but if anyone has any input, that'd be sweet. Thanks!
I can probably post pictures if you need a better idea of what I'm trying to say...