Attach skeletal mesh with ragdoll physics to weapon

I’m trying to attach a skeletal mesh (fishing line) to my weapon (a fishing rod). I’ve created a physics asset for it and attached it as a SkeletalMeshComponent to a socket on my rod.

Here’s my code for my fishing rod firearm class:



class MyFirearm_FishingRod extends MyFirearm;

var SkeletalMeshComponent FishingLineSkelMesh;

simulated function PostBeginPlay()
{
    Super.PostBeginPlay();
    AttachFishingLine();
}

simulated function AttachFishingLine()
{
   Mesh.AttachComponentToSocket(FishingLineSkelMesh, 'rod_tip');
}

defaultproperties
{
    //Firearm mesh
    begin object name=FirearmMesh
        SkeletalMesh=SkeletalMesh'PathTo.SkeletalMeshes.fishing_rod'
    end object

    Begin Object Class=SkeletalMeshComponent Name=LineSkelMeshComp
        SkeletalMesh=SkeletalMesh'PatchTo.SkeletalMeshes.fishing_line'
        PhysicsAsset=PhysicsAsset'PathTo.PhysicsAssets.fishing_line_Physics'

        bHasPhysicsAssetInstance=true
    End Object

    FishingLineSkelMesh=LineSkelMeshComp
}


The line attaches fine. However the physics asset doesn’t play, and the line remains rigid.

Does anyone know what i’m missing to run the physics simulation on the line?

have you tried this?
https://docs.unrealengine.com/udk/Three/PhysicalAnimation.html#Partial physical simulation on skeletal meshes

Thanks Chosker, i’ll check that out :slight_smile:

how did you make the fishing pole ?

Hi guys,

I Have the same problem, but i’m doing this with Blueprint,
I’ve a Whip that’s a skeletalMesh and i need to attach that whip with ragdoll collision (or something similar) to the hand of my player, but when i try, the whip falls in the ground.

Can someone help me?

this is unreal engine 3, blueprint does not exist here
please go to the unreal engine 4 sub-forums