I’ll like to impale my player on a socket on my enemy’s skelmesh.
I’ve tried the following in my enemy’s pawn:
simulated function ImpaleCorpse(MyPlayerPawn p)
{
if (p!= none && Mesh != none) {
p.SetBase(Self,, Mesh, 'HornSocket');
}
}
}
My player’s corpse remains ragdolled on the floor, and seems to twitch like it’s trying to be moved by the enemy, but something seems to be fighting it actually working correctly.
Thanks Chosker. I just tried that. It seems the physics spaz out. The corpse does get dragged around, but the mesh is getting stretched and is jumping all over the place.
simulated function Tick( float DeltaTime )
{
local vector boneLoc;
local rotator boneRot;
super.Tick(DeltaTime);
if (GrabbedCorpse != none) {
Mesh.GetSocketWorldLocationAndRotation(MouthSocket, boneLoc, boneRot);
GrabbedCorpse.Mesh.SetRBPosition(boneLoc, 'Bip001-L-UpperArm');
}
I’m making some progress using the RB_Handle class (which is what the UTWeap_PhysicsGun uses).
The trouble I’m finding is that it never hard attaches to the bone location, and is very springy with it’s attachment. Does anyone know how to remove the springy-ness when using RB_Handle?