top of page

Ragdoll Physics

Today I learnt Ragdoll Physics in UE4.

First I created a new trigger box in the viewport editor.

Next I opened the level blueprint for Level One, and with the trigger box selected, I added a new red node for 'Add On Actor Begin Overlap'.

I then opened the ThirdPersonCharacter Blueprint. In the Components tab I selected the 'Mesh (Inherited) icon and changed the collision pre-set to 'Block All'.

I made a new process in the ThirdPersonCharacter Blueprint to enable Ragdoll. I did this by adding a new node for a custom event - which I named EnableRagdoll. I linked it to 'Set Simulate Physics' blue node and made sure the target was mesh.

I then added some additional pseudocode to make the level restart once the character has died.

I tested this by playing the level before moving on to the next part. Both ragdoll and restarting the level worked correctly.

Next I changed the code so that instead of restarting the level when the character dies, the character respawns.

I looked at the viewport editor and took the location co-ordinates for X, Y and Z from where the character starts in the game and entered them into the green 'Make Transform' node in the 'location' field. This made sure that the character would respawn in the same place.

I tested this in the game and everything worked correctly.

 RECENT POSTS: 
 SEARCH BY TAGS: 
No tags yet.

Tip: Press on any item to see the full post.

bottom of page