How to make a BASIC DISMEMBERMENT system in Godot 4.2!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Let's make a basic dismemberment system. First, we add our rigged character to the scene. Then, we select the skeleton node and create physical bones by clicking on 'Create physical skeleton' in the Skeleton 3D pop-up menu atop the UI bar Following that, we remove unnecessary physical bones such as fingers, toes, and a few spine bones. You might notice yellow warnings next to physical bones. If you do, check and reset the scale of the physical bones. Sometimes, the warnings remain, it might just be a bug in the Godot engine,so no need to worry too much about it. We also tweak their collision shapes to fit better, making sure they don't overlap as it might cause weird glitches in how the ragdoll physics behaves. Next, we group the physical bones we wish to dismember under a category named 'limbs.' To guarantee that the physical bones correctly mimic the animation bones, we rely on code. Without this synchronization, the bones would remain static and only start moving once the physical_bones_start_ simulation is initiated. The code looks like this: We save each physical bone in an array and use a 'for' loop to set the global transform of each physical bone to the animated bone. We multiply it with the skeleton's global transform and last but not least we multiply it by the physical bone offset to ensure perfect alignment. Moving forward, we proceed to add the dismembered limbs. In Blender, we cut the mesh into the required parts. To achieve precise cuts, we select the skeleton and scale down the bone in the pose mode that we plan to cut out. This serves as a guide for cutting the selected limb. After exporting the dismembered limbs to our project, we'll open one of the exported limbs as a new inherited scene. Then, we'll change the root scene to a rigid-body, make sure you name name every dismembered limb to match the corresponding physical bone (e.g., LeftArm matches LeftArm in the code) for improved organization. If all the body parts are saved, the next step is to ensure that they're positioned correctly. To achieve this, we use a 'bone_attachment_3D' node. First, we add this node to the skeleton and select the desired bone, such as the left arm. Then, within the 'bone_attachment_3D' node, we add the LeftArm rigid body as a child. Following this, we right-click on the rigid-body and select 'editable children' to enable adjustments. This allows us to precisely align the mesh, ensuring it matches the body's orientation. Finally, we replicate both the position and rotation settings onto the LeftArm mesh within the rigid-body scene. We repeat this process with other body parts as well. Now, onto the dismemberment function. First, we check if the bone we've picked has a child bone. Next, we remove the physical bones from the scene and the array, while scaling down the animated bone. Then, we loop through an array of dismembered parts to find the dismembered part that matches the selected bone. If it's found, we instantiate the dismembered part, position it at the animated bone's location, and add a blood particle effect. We also check for any child bones present along with the dismemberment, if yes we instantiate the child's dismembered limb and position it accordingly. Basic joint is added between the dismembered limbs if needed, and the ragdoll simulation begins once the character is decapitated. And now you know how to make a basic dismemberment system!
Info
Channel: Alenvei
Views: 10,240
Rating: undefined out of 5
Keywords: Alenvei, developer, blender, indie game, tutorial, godot, vlog, unity3D, script, 1994, 4991, devlog, godot4, cringe, 3D, godot3d, collision, godot4.2, godot4.1, fps, system, FPS, godot 4.2, how, to, make, ragdoll, dismembered, cut, slash, decapitated, ragdoll physics, limb, limbs, Engore, cutting, blood, effects, vfx, brake, destroy, amputation
Id: FqOPnAvUBdM
Channel Id: undefined
Length: 3min 44sec (224 seconds)
Published: Sat Dec 16 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.