# Trigger character ragdoll with input key event?

**URL:** <https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592>\
**Category:** Character & Animation\
**Tags:** ragdoll, unreal-engine, Physics, Blueprint, question\
**Created:** [April 4, 2014, 2:07am UTC](https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592 "2014-04-04T02:07:24Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Snow](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Snow](https://forums.unrealengine.com/u/Snow)\
**Post date:** [April 4, 2014, 2:07am UTC](https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592/1 "2014-04-04T02:07:24Z")

</div>

I so far haven’t been able to trigger ragdoll on the character, or on placed skeletal meshes. I’m using the third person character template.

**Edit:** I figured it out eventually, the example character doesn’t have a physics asset. Luckily, it’s not hard to add one:

1. Go to the **Blurprints** folder in the **Content Browser** and double click the **MyCharacter** blueprint.

2. Click the **Components** tab in the top right. Then on the left select the character mesh: **Mesh\_\_\_\_HeroTPP**

3. Scroll through the **Details** panel until you find **Collision/Collision Presets** and change it from **CharacterMesh** to **Ragdoll**.

4. Go to the **Character folder** in the **Content Browser** and **Right click/Open in Full Editor** on **HeroTPP** :

![3961-ragdoll+1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/1/4/9144e4f8401fbebb03db1ebf42d293dd5c4d946b.jpeg)

1. Open up the level blueprint and make a blueprint like this:

 ![3962-01.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/6/c/b6cc76828b320f6a7e9b4bc385654ce85dead825.jpeg)

1. Right click and search for the nodes, if you can’t find any of them, uncheck the context sensitive filter. ‘Target Mesh’ is created when you wire Get Player Character to Set Simulate Physics. Make sure you **check** the **Simulate** box in **Set Simulate Physics**.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_759e5c3a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_759e5c3a](https://forums.unrealengine.com/u/anonymous_user_759e5c3a)\
**Post date:** [April 4, 2014, 2:22am UTC](https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592/2 "2014-04-04T02:22:31Z")

</div>

Hello,

You will want to drag off a get reference to your mesh and then use a “Set Simulate Physics” node set to true.

 ![3194-ragdoll.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/a/9/9a9e729f9ee530eead0828033b0bfa502870ee59.jpeg)

In this example, I am in a player controller, casting to my character, so that when I press ‘F’ the character’s Skeletal Mesh will enter a “ragdoll” state. I hope this helps!

Cheers!

---

<div class="post-metadata">

**Author:** ![Snow](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Snow](https://forums.unrealengine.com/u/Snow)\
**Post date:** [April 4, 2014, 3:06am UTC](https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592/3 "2014-04-04T03:06:47Z")

</div>

Thanks, !

I can’t seem to get the right “Target Mesh” reference, just a regular Mesh variable. The context sensitive filter doesn’t pick it up.

I’m in the graph editor for the character blueprint, is that the right place?

 ![3185-blueprint+1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/5/0/35038d180fae8551e3e31833568b3f98d681bd71.jpeg)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_759e5c3a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_759e5c3a](https://forums.unrealengine.com/u/anonymous_user_759e5c3a)\
**Post date:** [April 4, 2014, 3:12am UTC](https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592/4 "2014-04-04T03:12:44Z")

</div>

It’s sensitive to what is being dragged off of. You should click-drag off of the Cast To’s “As Character” then search for “Get Mesh”. Let me know if that helps!

---

<div class="post-metadata">

**Author:** ![Snow](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Snow](https://forums.unrealengine.com/u/Snow)\
**Post date:** [April 4, 2014, 3:21am UTC](https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592/5 "2014-04-04T03:21:11Z")

</div>

It just creates that same mesh node, but unlinked from Cast To Character.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_759e5c3a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_759e5c3a](https://forums.unrealengine.com/u/anonymous_user_759e5c3a)\
**Post date:** [April 5, 2014, 1:07pm UTC](https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592/6 "2014-04-05T13:07:02Z")

</div>

Oh, I didn’t notice that you were already in the Character. You do not need to cast, just do Inputkey F straight into Set Simulate Physics. The way I thought you were doing it was by using the Controller Blueprint, but if you are having it done directly from the character, then you do not have to cast to it.

---

<div class="post-metadata">

**Author:** ![Snow](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Snow](https://forums.unrealengine.com/u/Snow)\
**Post date:** [April 5, 2014, 7:57pm UTC](https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592/7 "2014-04-05T19:57:26Z")

</div>

That causes the character to freeze in place. When I toggle _Set Simulate Physics_ off, it goes back to normal.

I think the example character in the for Third Person Blueprint doesn’t have a physics asset. I tried grabbing one from Example Content and placing it in my map to see what would happen. It just flickers and doesn’t collapse. Most difficult.

---

<div class="post-metadata">

**Author:** ![ClaverFlav](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ClaverFlav](https://forums.unrealengine.com/u/ClaverFlav)\
**Post date:** [April 6, 2014, 5:52am UTC](https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592/8 "2014-04-06T05:52:06Z")

</div>

i set the skeletal meshes collision preset to ragdoll, and then used the mesh in blueprints to call SetAllBodiesSimulatePhyics… then it worked

---

<div class="post-metadata">

**Author:** ![Snow](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Snow](https://forums.unrealengine.com/u/Snow)\
**Post date:** [April 7, 2014, 11:30pm UTC](https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592/9 "2014-04-07T23:30:42Z")

</div>

Still no dice. You got this to work with the example character? Doesn’t seem to do anything. I changed the Collision Presets to Ragdoll in Components for the MyCharacter Blueprint:

 ![3438-01.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/d/3/8d3e4f3f74a3acb17f101cea18fc7e361f024f86.jpeg)

I tried both _Set Simulate Physics_ and _Set All Bodies Simulate Physics_. I mash the F key and nothing happens.

![3451-04.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/a/3/3a35aa4bea1affd7c23c580b49f73771e9a834c1.jpeg)

I also tried _Wake Rigid Body_ and _Wake All Rigid Bodies_, no affect.

---

<div class="post-metadata">

**Author:** ![Pixeldamage](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pixeldamage](https://forums.unrealengine.com/u/Pixeldamage)\
**Post date:** [April 15, 2014, 11:53pm UTC](https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592/10 "2014-04-15T23:53:02Z")

</div>

I came across this because I’m making a skateboarding game and want to trigger my character to ragdoll if an animation doesn’t finish.

I managed to get the above (top) method working (triggering ragdoll via key presses). But I am unsure how to make this work in my context. I tried creating a boolean variable called “Bail” which I planned to set to to true inside my Animation Blueprint (when ‘IsInAir’ was false + trick animation not finished).

My first issue is that I cannot hook up a ‘get’ boolean variable into the “Set Simulate Physics” Node. It’ll accept ‘setter’ versions but this isn’t going to help me as I need it to ask (get) the value from the animation state machine. Maybe I’m thinking about this wrong? (I’m new to scripting/kismet/Blueprints etc).

Thanks

---

<div class="post-metadata">

**Author:** ![Snow](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Snow](https://forums.unrealengine.com/u/Snow)\
**Post date:** [April 16, 2014, 10:52am UTC](https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592/11 "2014-04-16T10:52:54Z")

</div>

I’m trying to do the same thing, although not for a skateboarding game.

You need 2 variables, one for when the character is in the air (which already exists) and one for when the animation is playing. Then when both are true, trigger the ragdoll. In logic/flow control this is called an ‘AND gate’. You can do it with Branch nodes:

 ![4211-01.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/c/5/fc5f114367b02a9fecbbd54e81ca2900e32cbdb9.jpeg)

I created a new boolean variable called ‘Animation Playing’ (you can call it whatever). Then dragged it onto the graph and created a ‘Set variable’ for True and another ‘Set variable’ for False. I used a Delay function between them for the length of the animation.

Then I made a Branch node for the ‘Is in Air’ and ‘Animation Playing’ variables.

This isn’t a complete blueprint because I actually don’t know how to trigger an animation or ragdoll in the AnimBlueprint. It’s different from the Level and Class Blueprints. If you know how to do those parts, that could help.

---

<div class="post-metadata">

**Author:** ![Pixeldamage](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pixeldamage](https://forums.unrealengine.com/u/Pixeldamage)\
**Post date:** [April 16, 2014, 6:07pm UTC](https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592/12 "2014-04-16T18:07:51Z")

</div>

That’s a great help Snow thanks! 🙂

I’m having some success. I can now trigger the ragdoll from within the Anim Blueprint but by using the methods above (also in my screengrab). What’s happening here is that I discovered the ‘AnimNotify\_jumpNotify’ node and am using that to trigger the AnimIsPlaying node. This is only a temporary hack since my Olli animation triggers at the same point as the jumpNotify.

 ![4265-trigger-ragdoll-by-anim-incomplete.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/0/a/d0a7809c820926f9dfbc715978e0037e65c8f863.jpeg)

---

<div class="post-metadata">

**Author:** ![Snow](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Snow](https://forums.unrealengine.com/u/Snow)\
**Post date:** [April 16, 2014, 9:17pm UTC](https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592/13 "2014-04-16T21:17:03Z")

</div>

I think I told you to hook it up wrong, the ‘Is in Air’ Branch node should be using the False output leading into the next node. That way the ragdoll will trigger when you hit the ground, if animation still is playing.

You can also make the character’s physics capsule ragdoll. Since that’s what the camera is attached to, it makes the whole thing seem more natural.

Open the character blueprint. In the Components tab, select the ‘[ROOT] CapsuleComponent’ and change its Collision Presets to Ragdoll. Under Rendering, you can also uncheck ‘Hidden in Game’ to see it happen.

 ![4277-14.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/a/3/3a349a287189c3483bbf47ce9134443f65560dd9.jpeg)

Then in the blueprint, drag a wire off Get Player Character and search ‘Get Capsule Component’. You can take control away from the player too with Set Ignore Move Input:

 ![4276-02.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/f/c/3fcf456faedf96f79161b4657ee35e8bc2766e0c.jpeg)

I still can’t get get the character to go back to normal after the ragdoll, or set up a physics asset that isn’t completely ridiculous. But it’s getting there.

---

<div class="post-metadata">

**Author:** ![Pixeldamage](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pixeldamage](https://forums.unrealengine.com/u/Pixeldamage)\
**Post date:** [April 23, 2014, 9:31am UTC](https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592/14 "2014-04-23T09:31:21Z")

</div>

Did you make progress Snow? Surely respawning will reset the ragdoll no? I haven’t had a to get this working properly yet (got sidetracked getting a scoring/pickup system working & working on art assets). I did have a quick look at my logic and realised it wont work properly for Olli anims.

IF BAIL condition (inAir==false & animplaying== true) then this could mean that as soon as the skater hits the jump/Olli button he’ll bail because he’s on the ground playing an animation (at least for the first few frames). I think I probably need a AnimJump Event with an Animation Tag in the Anim BP which triggers a message at a certain frame of the Olli anim.

---

<div class="post-metadata">

**Author:** ![MintyCMS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MintyCMS](https://forums.unrealengine.com/u/MintyCMS)\
**Post date:** [September 2, 2016, 5:53pm UTC](https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592/15 "2016-09-02T17:53:21Z")

</div>

I cant find Set Simulate Physics node.  
PS i am not snow

---

<div class="post-metadata">

**Author:** ![MintyCMS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MintyCMS](https://forums.unrealengine.com/u/MintyCMS)\
**Post date:** [September 2, 2016, 6:00pm UTC](https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592/16 "2016-09-02T18:00:07Z")

</div>

nvrmnd i found it

---

<div class="post-metadata">

**Author:** ![MintyCMS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MintyCMS](https://forums.unrealengine.com/u/MintyCMS)\
**Post date:** [September 2, 2016, 6:02pm UTC](https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592/17 "2016-09-02T18:02:08Z")

</div>

I’m not doin this anymore

---

<div class="post-metadata">

**Author:** ![malosal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@malosal](https://forums.unrealengine.com/u/malosal)\
**Post date:** [July 12, 2017, 1:25am UTC](https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592/18 "2017-07-12T01:25:06Z")

</div>

care to share?

---

<div class="post-metadata">

**Author:** ![jeremythuff](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jeremythuff](https://forums.unrealengine.com/u/jeremythuff)\
**Post date:** [August 4, 2020, 11:20pm UTC](https://forums.unrealengine.com/t/trigger-character-ragdoll-with-input-key-event/279592/19 "2020-08-04T23:20:10Z")

</div>

I found this question while looking into how to do this, and though it is older I thought I would share what I came up with:

I have two functions on my character’s blueprint, StartRagdoll and StopRagdoll.

StartRagdoll takes a reference to the character mesh and sets its collision profile to ‘Ragdoll’ and then sets Simulate Physics to true.

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/8/c/18c6b28d077cb7618b6279d0c58e35ce1b430f71.jpeg)

StopRagdoll does the same in reverse, but then it reattaches the mesh to the capsule component and sets it relative location and rotation to the same values that the mesh started with.

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/2/1/62114d2892808ec64937e9e7ff9461a572f5e35b.jpeg)
