Add multiplayer damage system and ragdolls

This commit is contained in:
2025-01-26 14:39:11 +01:00
parent 7da4a3d6bb
commit 06a1d28e42
53 changed files with 3969 additions and 61 deletions

View File

@ -1,8 +1,11 @@
extends Node3D
var owner_placeholder: CharacterBody3D = null
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
$Body/Armature/Skeleton3D.physical_bones_start_simulation()
owner_placeholder = _get_owner()
pass # Replace with function body.
@ -12,5 +15,27 @@ func _process(delta: float) -> void:
func _on_head_collision_body_part_hit(dam: Variant) -> void:
print("head is hit")
#print("head is hit" + str(dam))
#print(owner_placeholder)
#if owner_placeholder.has_method("take_damage"):
if owner_placeholder:
owner_placeholder.take_damage(dam)
pass # Replace with function body.
func _get_owner() -> CharacterBody3D:
var owner_placeholder := find_parent("PlayerPlaceholder*")
return owner_placeholder
func die():
for child in $Body/Armature/Skeleton3D/PhysicalBoneSimulator3D.get_children():
if child is PhysicalBone3D:
child.collision_layer = 1
child.collision_mask = 1
$Body/Armature/Skeleton3D.physical_bones_stop_simulation()
$Body/Armature/Skeleton3D/PhysicalBoneSimulator3D.physical_bones_start_simulation()
func make_invisible():
$Body/Armature/Skeleton3D/Alpha_Joints.set_layer_mask_value(1, false)
$Body/Armature/Skeleton3D/Alpha_Surface.set_layer_mask_value(1, false)
$Body/Armature/Skeleton3D/Alpha_Joints.set_layer_mask_value(2, true)
$Body/Armature/Skeleton3D/Alpha_Surface.set_layer_mask_value(2, true)

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=12 format=4 uid="uid://1txob6jskn5s"]
[gd_scene load_steps=28 format=4 uid="uid://1txob6jskn5s"]
[ext_resource type="Script" path="res://scenes/characters/blue/dummy.gd" id="1_cyeub"]
[ext_resource type="Script" path="res://scenes/characters/blue/head_collision.gd" id="1_lianf"]
@ -258,9 +258,70 @@ blend_shape_mode = 0
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_j3emx"]
albedo_color = Color(0, 0, 1, 1)
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_k5bjr"]
radius = 11.245
height = 27.8
[sub_resource type="SphereShape3D" id="SphereShape3D_axep3"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_0ptuo"]
radius = 11.7055
height = 28.953
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_126jt"]
radius = 3.944
height = 12.926
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_1gw5y"]
radius = 10.779
height = 24.58
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_krlof"]
radius = 2.74047
height = 27.4047
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_2k34c"]
radius = 2.76145
height = 27.6145
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_5fgdh"]
radius = 5.286
height = 20.647
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_8vkyv"]
radius = 2.74047
height = 27.4047
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_fh1k4"]
radius = 2.76144
height = 27.6144
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_1m8r5"]
radius = 5.286
height = 20.647
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_3cygo"]
radius = 4.05994
height = 40.5994
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_vwdij"]
radius = 4.2099
height = 42.099
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_qyg6j"]
radius = 1.57216
height = 15.7216
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_a81km"]
radius = 4.05995
height = 40.5995
[sub_resource type="CylinderShape3D" id="CylinderShape3D_2binp"]
height = 42.0
radius = 3.0
[sub_resource type="CylinderShape3D" id="CylinderShape3D_l2il6"]
height = 27.0
radius = 1.75
[sub_resource type="SphereShape3D" id="SphereShape3D_wnhib"]
radius = 1.2
[sub_resource type="Animation" id="Animation_6g1lc"]
resource_name = "Run Forward"
@ -867,7 +928,7 @@ _data = {
}
[node name="Dummy" type="Node3D"]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
transform = Transform3D(-1, 0, -1.50996e-07, 0, 1, 0, 1.50996e-07, 0, -1, 0, 0, 0)
script = ExtResource("1_cyeub")
[node name="Body" type="Node3D" parent="."]
@ -1048,7 +1109,7 @@ bones/24/name = "mixamorig_LeftHandRing2"
bones/24/parent = 23
bones/24/rest = Transform3D(1, 1.61871e-05, -9.45085e-08, -1.61871e-05, 1, 3.29224e-06, 9.45618e-08, -3.29224e-06, 1, 6.3543e-07, 3.60118, -1.47875e-05)
bones/24/enabled = true
bones/24/position = Vector3(-3.30613e-06, 3.60119, 1.50863e-07)
bones/24/position = Vector3(-3.30613e-06, 3.60119, 1.50864e-07)
bones/24/rotation = Quaternion(0.563924, -3.30111e-07, -0.0577891, 0.823803)
bones/24/scale = Vector3(1, 1, 1)
bones/25/name = "mixamorig_LeftHandRing3"
@ -1077,7 +1138,7 @@ bones/28/parent = 27
bones/28/rest = Transform3D(1, 0.000736602, -7.57697e-07, -0.000736602, 1, 9.24707e-06, 7.64508e-07, -9.24651e-06, 1, 1.0844e-06, 4.13666, 1.41886e-05)
bones/28/enabled = true
bones/28/position = Vector3(-9.08385e-06, 4.13665, 5.47372e-06)
bones/28/rotation = Quaternion(0.433129, -6.53828e-07, -0.0443853, 0.900239)
bones/28/rotation = Quaternion(0.433129, -6.53827e-07, -0.0443853, 0.900239)
bones/28/scale = Vector3(1, 1, 1)
bones/29/name = "mixamorig_LeftHandPinky3"
bones/29/parent = 28
@ -1126,7 +1187,7 @@ bones/35/parent = 34
bones/35/rest = Transform3D(0.894428, 0.447212, -8.12113e-07, -0.387297, 0.774597, -0.500001, -0.223606, 0.447215, 0.866025, 3.00297, 3.7888, 2.16716)
bones/35/enabled = true
bones/35/position = Vector3(3.00297, 3.7888, 2.16716)
bones/35/rotation = Quaternion(0.227577, -0.0598799, -0.162411, 0.958252)
bones/35/rotation = Quaternion(0.227577, -0.0598799, -0.162411, 0.958251)
bones/35/scale = Vector3(1, 1, 1)
bones/36/name = "mixamorig_RightHandThumb2"
bones/36/parent = 35
@ -1210,14 +1271,14 @@ bones/47/parent = 34
bones/47/rest = Transform3D(1, 9.66599e-06, -1.40744e-07, -9.66599e-06, 1, -2.81994e-06, 1.40717e-07, 2.81994e-06, 1, -2.21663, 12.147, -0.00999829)
bones/47/enabled = true
bones/47/position = Vector3(-2.21664, 12.147, -0.00998812)
bones/47/rotation = Quaternion(0.0911117, 0.11369, 0.100504, 0.984211)
bones/47/rotation = Quaternion(0.0911117, 0.11369, 0.100504, 0.984212)
bones/47/scale = Vector3(1, 1, 1)
bones/48/name = "mixamorig_RightHandRing2"
bones/48/parent = 47
bones/48/rest = Transform3D(1, -1.60845e-05, 3.26056e-09, 1.60845e-05, 1, 1.32059e-06, -3.2818e-09, -1.32059e-06, 1, -2.50026e-07, 3.6012, -7.75122e-07)
bones/48/enabled = true
bones/48/position = Vector3(-2.50026e-07, 3.6012, -7.75122e-07)
bones/48/rotation = Quaternion(0.836665, 8.70473e-07, 0.068157, 0.543457)
bones/48/rotation = Quaternion(0.836665, 8.70474e-07, 0.068157, 0.543457)
bones/48/scale = Vector3(1, 1, 1)
bones/49/name = "mixamorig_RightHandRing3"
bones/49/parent = 48
@ -1301,14 +1362,14 @@ bones/60/parent = 0
bones/60/rest = Transform3D(-0.999981, -0.00611455, -7.52684e-05, 0.00611501, -0.999901, -0.0126672, 2.1931e-06, -0.0126674, 0.99992, -9.12503, -6.6556, -0.0553527)
bones/60/enabled = true
bones/60/position = Vector3(-9.12503, -6.6556, -0.0553527)
bones/60/rotation = Quaternion(-0.0339456, 0.334676, 0.92684, -0.166754)
bones/60/rotation = Quaternion(-0.0339455, 0.334676, 0.92684, -0.166754)
bones/60/scale = Vector3(1, 1, 1)
bones/61/name = "mixamorig_RightLeg"
bones/61/parent = 60
bones/61/rest = Transform3D(0.99993, -0.0118315, -0.000580536, 0.0118448, 0.999271, 0.0362854, 0.000150802, -0.0362897, 0.999341, 3.28565e-07, 40.5995, 1.49012e-08)
bones/61/enabled = true
bones/61/position = Vector3(3.28565e-07, 40.5995, 1.49012e-08)
bones/61/rotation = Quaternion(-0.581827, -0.0846291, -0.0166473, 0.808727)
bones/61/rotation = Quaternion(-0.581827, -0.0846291, -0.0166473, 0.808726)
bones/61/scale = Vector3(1, 1, 1)
bones/62/name = "mixamorig_RightFoot"
bones/62/parent = 61
@ -1344,7 +1405,7 @@ surface_material_override/0 = SubResource("StandardMaterial3D_j3emx")
[node name="HitCollisions" type="Node3D" parent="Body/Armature/Skeleton3D"]
[node name="BoneAttachment3D" type="BoneAttachment3D" parent="Body/Armature/Skeleton3D"]
transform = Transform3D(0.978017, -0.176546, -0.110972, 0.15839, 0.282801, 0.94601, -0.135631, -0.942791, 0.304547, -11.8203, 17.7472, -135.936)
transform = Transform3D(0.978017, -0.176546, -0.110973, 0.15839, 0.282801, 0.946011, -0.135631, -0.942791, 0.304547, -11.8203, 17.7472, -135.936)
bone_name = "mixamorig_Head"
bone_idx = 5
@ -1352,10 +1413,265 @@ bone_idx = 5
transform = Transform3D(9.90229, 1.3945, -6.09554e-08, 0, -4.37114e-07, -10, -1.3945, 9.90229, -4.32843e-07, 0.58762, 7.43451, 1.4646)
script = ExtResource("1_lianf")
[node name="Collision" type="CollisionShape3D" parent="Body/Armature/Skeleton3D/BoneAttachment3D/HeadCollision"]
shape = SubResource("CapsuleShape3D_k5bjr")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body/Armature/Skeleton3D/BoneAttachment3D/HeadCollision"]
shape = SubResource("SphereShape3D_axep3")
[node name="CSGCylinder3D" type="CSGCylinder3D" parent="Body/Armature/Skeleton3D/BoneAttachment3D"]
[node name="PhysicalBoneSimulator3D" type="PhysicalBoneSimulator3D" parent="Body/Armature/Skeleton3D"]
[node name="Physical Bone mixamorig_Hips" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(82.5044, -54.0559, -16.4615, 55.0482, 83.4649, 1.8195, 12.756, -10.5629, 98.619, 1.31498, 0.290623, -87.4646)
collision_layer = 4
collision_mask = 4
joint_type = 1
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.50607e-08, -5.58794e-09, 0.0499956)
body_offset = Transform3D(100, -0.0695305, -0.00860631, -1.00136e-05, 12.2744, -99.2438, 0.0700493, 99.2438, 12.2744, 0.000436783, 4.96175, -0.613665)
mass = 20.0
bone_name = "mixamorig_Hips"
joint_constraints/bias = 0.3
joint_constraints/damping = 1.0
joint_constraints/impulse_clamp = 0.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D/Physical Bone mixamorig_Hips"]
transform = Transform3D(0.01, 0, 0, 0, -4.37114e-10, 0.01, 0, -0.01, -4.37114e-10, 0.0161502, -2.32831e-11, 1.01774e-18)
shape = SubResource("CapsuleShape3D_0ptuo")
[node name="Physical Bone mixamorig_Spine" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(80.9412, -58.5461, -4.56913, 57.6046, 80.6695, -13.1964, 11.4119, 8.0493, 99.0201, 2.40599, 0.973749, -98.2036)
collision_layer = 4
collision_mask = 4
joint_type = 1
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.06134e-09, 2.2377e-09, 0.05866)
body_offset = Transform3D(100, 1.52588e-05, 7.62939e-06, 4.76837e-06, -9.53674e-07, -100, -1.52588e-05, 100, -3.8147e-06, -9.53674e-07, 5.866, 0)
mass = 20.0
bone_name = "mixamorig_Spine"
joint_constraints/bias = 0.3
joint_constraints/damping = 1.0
joint_constraints/impulse_clamp = 0.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D/Physical Bone mixamorig_Spine"]
transform = Transform3D(0.0318071, 3.86358e-14, 4.9738e-14, -2.13163e-14, -1.62981e-09, 0.0318071, -4.26326e-14, -0.0318071, -1.62981e-09, -0.00245133, -5.91656e-09, -0.223859)
shape = SubResource("CapsuleShape3D_126jt")
[node name="Physical Bone mixamorig_Head" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(-97.8019, 4.47329, 20.366, -15.8369, -79.4709, -58.5966, 13.5638, -60.5339, 78.4325, -13.8193, 23.4986, -143.635)
collision_layer = 4
collision_mask = 4
joint_type = 1
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.83517e-10, -1.39698e-07, 0.0981531)
body_offset = Transform3D(-100, -0.00220108, -0.000778198, -5.24521e-06, 33.8066, -94.1122, 0.00232792, -94.1122, -33.8066, 7.62939e-05, 9.23741, 3.31821)
mass = 7.0
bone_name = "mixamorig_Head"
joint_constraints/bias = 0.3
joint_constraints/damping = 1.0
joint_constraints/impulse_clamp = 0.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D/Physical Bone mixamorig_Head"]
transform = Transform3D(0.01, 0, 0, 0, -4.37114e-10, 0.01, 0, -0.01, -4.37114e-10, 0, 0, 0)
shape = SubResource("CapsuleShape3D_1gw5y")
[node name="Physical Bone mixamorig_LeftArm" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(86.1165, 14.0252, -48.8594, -45.4995, 64.1262, -61.787, 22.6659, 75.4396, 61.6046, 16.1942, 31.0309, -132.592)
collision_layer = 4
collision_mask = 4
joint_type = 1
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.70432e-08, 8.67479e-08, 0.137023)
body_offset = Transform3D(100, -3.05176e-05, -3.43323e-05, 1.71661e-05, 100, -7.62939e-06, 1.52588e-05, -3.8147e-06, 100, 0, -7.62939e-06, -13.7023)
mass = 3.0
bone_name = "mixamorig_LeftArm"
joint_constraints/bias = 0.3
joint_constraints/damping = 1.0
joint_constraints/impulse_clamp = 0.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D/Physical Bone mixamorig_LeftArm"]
transform = Transform3D(0.01, 0, 0, 0, 0.00997432, -0.000716193, 0, 0.000716193, 0.00997432, 4.61853e-15, 0.165399, 0.142978)
shape = SubResource("CapsuleShape3D_krlof")
[node name="Physical Bone mixamorig_LeftForeArm" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(-48.2566, -12.058, 86.752, -78.7312, -37.4258, -48.997, 38.3757, -91.9452, 8.56699, 1.36485, 46.9033, -104.66)
collision_layer = 4
collision_mask = 4
joint_type = 1
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.52506e-07, 1.36787e-07, 0.138072)
body_offset = Transform3D(100, 2.86102e-05, -3.8147e-05, -3.8147e-05, -1.90735e-06, -100, -3.8147e-06, 100, 1.14441e-05, 3.05176e-05, 13.8072, -1.52588e-05)
mass = 3.0
bone_name = "mixamorig_LeftForeArm"
joint_constraints/bias = 0.3
joint_constraints/damping = 1.0
joint_constraints/impulse_clamp = 0.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D/Physical Bone mixamorig_LeftForeArm"]
transform = Transform3D(0.01, 0, 0, 0, -4.37114e-10, 0.01, 0, -0.01, -4.37114e-10, 0, 0, 0)
shape = SubResource("CapsuleShape3D_2k34c")
[node name="Physical Bone mixamorig_LeftHand" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(9.11563, -98.6768, 13.4089, 23.9481, -10.8976, -96.4766, 96.6612, 12.0056, 22.6379, -10.9685, 56.2242, -106.442)
collision_layer = 4
collision_mask = 4
joint_type = 1
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.24797e-07, -1.22003e-07, 0.0264902)
body_offset = Transform3D(-58.5197, 57.9894, 56.6805, 1.62125e-05, 69.899, -71.5132, -81.0891, -41.8493, -40.9047, -1.50148, 1.89441, 1.08356)
bone_name = "mixamorig_LeftHand"
joint_constraints/bias = 0.3
joint_constraints/damping = 1.0
joint_constraints/impulse_clamp = 0.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D/Physical Bone mixamorig_LeftHand"]
transform = Transform3D(0.01, 0, 0, 0, 0.00697578, 0.00716509, 0, -0.00716509, 0.00697578, 9.31323e-12, 0.0631712, -0.0648856)
shape = SubResource("CapsuleShape3D_5fgdh")
[node name="Physical Bone mixamorig_RightArm" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(30.7246, 72.8896, 61.1809, 93.7855, -34.092, -6.48192, 16.1331, 59.3704, -78.8345, -27.5296, -1.29566, -110.13)
collision_layer = 4
collision_mask = 4
joint_type = 1
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.50277e-08, 1.15999e-07, 0.137023)
body_offset = Transform3D(100, -5.72205e-06, 1.09673e-05, 6.67572e-06, 1.07288e-05, -100, -1.90735e-06, 100, 2.67029e-05, 0, 13.7023, -1.52588e-05)
mass = 3.0
bone_name = "mixamorig_RightArm"
joint_constraints/bias = 0.3
joint_constraints/damping = 1.0
joint_constraints/impulse_clamp = 0.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D/Physical Bone mixamorig_RightArm"]
transform = Transform3D(0.01, 0, 0, 0, -4.37114e-10, 0.01, 0, -0.01, -4.37114e-10, 0, 0, 0)
shape = SubResource("CapsuleShape3D_8vkyv")
[node name="Physical Bone mixamorig_RightForeArm" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(24.3552, 37.4063, 89.4852, -25.0101, 91.5653, -31.4688, -93.7087, -14.716, 31.6563, -48.2682, 3.93749, -103.698)
collision_layer = 4
collision_mask = 4
joint_type = 1
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.38762e-07, -5.86307e-09, 0.138072)
body_offset = Transform3D(100, -9.53674e-06, 1.00136e-05, -3.8147e-06, 100, 3.8147e-06, 5.72205e-06, -5.72205e-06, 100, -1.52588e-05, 5.96046e-08, -13.8072)
mass = 3.0
bone_name = "mixamorig_RightForeArm"
joint_constraints/bias = 0.3
joint_constraints/damping = 1.0
joint_constraints/impulse_clamp = 0.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D/Physical Bone mixamorig_RightForeArm"]
transform = Transform3D(0.01, 0, 0, 0, 0.00999714, -0.000239087, 0, 0.000239087, 0.00999714, 2.23821e-15, 0.145694, 0.138911)
shape = SubResource("CapsuleShape3D_fh1k4")
[node name="Physical Bone mixamorig_RightHand" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(89.0767, -24.8074, -38.0781, 5.05123, 88.6726, -45.9527, 45.1645, 39.0097, 80.2397, -24.5746, 26.0951, -105.517)
collision_layer = 4
collision_mask = 4
joint_type = 1
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.86265e-08, 2.31434e-07, 0.0264903)
body_offset = Transform3D(-58.5197, -57.9893, -56.6805, -1.04904e-05, 69.8991, -71.5131, 81.0891, -41.8492, -40.9048, 1.5015, 1.89439, 1.08359)
bone_name = "mixamorig_RightHand"
joint_constraints/bias = 0.3
joint_constraints/damping = 1.0
joint_constraints/impulse_clamp = 0.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D/Physical Bone mixamorig_RightHand"]
transform = Transform3D(0.01, 0, 0, 0, 0.00693402, 0.00720551, 0, -0.00720551, 0.00693402, -3.72529e-11, 0.0680192, -0.0706824)
shape = SubResource("CapsuleShape3D_1m8r5")
[node name="Physical Bone mixamorig_LeftUpLeg" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(-96.1774, -26.2684, 7.73901, -23.4203, 64.2554, -72.957, 14.1919, -71.9807, -67.9513, 5.83707, 19.601, -60.9754)
collision_layer = 4
collision_mask = 4
joint_type = 1
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.78612e-08, -7.74374e-09, 0.202997)
body_offset = Transform3D(100, -2.67029e-05, 9.53674e-06, 5.72205e-06, 7.62939e-06, -100, 3.33786e-05, 100, 3.8147e-06, -5.72205e-06, 20.2997, 0)
mass = 5.0
bone_name = "mixamorig_LeftUpLeg"
joint_constraints/bias = 0.3
joint_constraints/damping = 1.0
joint_constraints/impulse_clamp = 0.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D/Physical Bone mixamorig_LeftUpLeg"]
transform = Transform3D(0.01, 0, 0, 0, -4.37114e-10, 0.01, 0, -0.01, -4.37114e-10, 0, 0, 0)
shape = SubResource("CapsuleShape3D_3cygo")
[node name="Physical Bone mixamorig_LeftLeg" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(-97.5216, -11.6193, -18.8291, -22.0483, 58.1427, 78.3154, 1.84805, 80.5259, -59.2635, 8.22949, 17.9261, -34.7068)
collision_layer = 4
collision_mask = 4
joint_type = 1
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.01576e-09, -2.10753e-08, 0.210495)
body_offset = Transform3D(100, 4.76837e-06, 1.14441e-05, 5.72205e-06, 0, -100, -9.53674e-07, 100, 1.90735e-05, -1.90735e-06, 21.0495, -1.90735e-06)
mass = 5.0
bone_name = "mixamorig_LeftLeg"
joint_constraints/bias = 0.3
joint_constraints/damping = 1.0
joint_constraints/impulse_clamp = 0.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D/Physical Bone mixamorig_LeftLeg"]
transform = Transform3D(0.01, 0, 0, 0, -4.37114e-10, 0.01, 0, -0.01, -4.37114e-10, 0, 0, 0)
shape = SubResource("CapsuleShape3D_vwdij")
[node name="Physical Bone mixamorig_LeftFoot" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(-93.6712, -34.5296, 5.78095, -34.9451, 91.207, -21.4506, 2.13418, -22.1132, -97.501, 11.7385, 3.12728, -14.5678)
collision_layer = 4
collision_mask = 4
joint_type = 1
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.53808e-09, 5.17146e-08, 0.078608)
body_offset = Transform3D(100, 5.72205e-06, -3.8147e-06, -3.8147e-06, -1.52588e-05, -100, -5.72205e-06, 100, -3.24249e-05, 9.53674e-07, 7.8608, -2.6226e-06)
bone_name = "mixamorig_LeftFoot"
joint_constraints/bias = 0.3
joint_constraints/damping = 1.0
joint_constraints/impulse_clamp = 0.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D/Physical Bone mixamorig_LeftFoot"]
transform = Transform3D(0.01, 0, 0, 0, -4.37114e-10, 0.01, 0, -0.01, -4.37114e-10, 0, 0, 0)
shape = SubResource("CapsuleShape3D_qyg6j")
[node name="Physical Bone mixamorig_RightUpLeg" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(-83.6898, -51.5224, 18.4786, -50.5592, 59.8312, -62.161, 20.9708, -61.3651, -76.122, -11.4062, 7.37456, -61.646)
collision_layer = 4
collision_mask = 4
joint_type = 1
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.08665e-08, 7.74372e-09, 0.202997)
body_offset = Transform3D(100, -1.52588e-05, 3.8147e-06, 5.72205e-06, -3.8147e-06, -100, 1.14441e-05, 100, -3.8147e-06, -2.86102e-06, 20.2997, 0)
mass = 5.0
bone_name = "mixamorig_RightUpLeg"
joint_constraints/bias = 0.3
joint_constraints/damping = 1.0
joint_constraints/impulse_clamp = 0.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D/Physical Bone mixamorig_RightUpLeg"]
transform = Transform3D(0.01, 0, 0, 0, -4.37114e-10, 0.01, 0, -0.01, -4.37114e-10, 0, 0, 0)
shape = SubResource("CapsuleShape3D_a81km")
[node name="Physical Bone mixamorig_RightLeg" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(-91.8175, -23.5086, -31.8888, -36.0103, 83.0805, 42.437, 16.517, 50.4478, -84.7479, -8.44487, 11.0604, -28.3544)
collision_layer = 4
collision_mask = 4
joint_type = 1
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.06137e-10, -2.07784e-07, 0.210495)
body_offset = Transform3D(100, -1.52588e-05, 1.33514e-05, -9.53674e-07, 3.8147e-05, -100, 1.90735e-05, 100, 5.34058e-05, -2.86102e-06, 21.0495, 9.53674e-06)
mass = 5.0
bone_name = "mixamorig_RightLeg"
joint_constraints/bias = 0.3
joint_constraints/damping = 1.0
joint_constraints/impulse_clamp = 0.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D/Physical Bone mixamorig_RightLeg"]
transform = Transform3D(0.01, 0, 0, 0, -4.37114e-10, 0.01, 0, -0.01, -4.37114e-10, 0, 0, 0)
shape = SubResource("CylinderShape3D_2binp")
[node name="Physical Bone mixamorig_RightFoot" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(-88.192, -17.3351, 43.8367, -46.8549, 42.4444, -77.4796, -5.17505, -88.8705, -45.5549, -5.17837, 8.21811, -6.93437)
collision_layer = 4
collision_mask = 4
joint_type = 1
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.24153e-08, -2.70381e-09, 0.078608)
body_offset = Transform3D(100, 1.14441e-05, -7.62939e-06, -7.62939e-06, -1.90735e-05, -100, 0, 100, -5.72205e-05, 5.84126e-06, 7.8608, 4.76837e-06)
bone_name = "mixamorig_RightFoot"
joint_constraints/bias = 0.3
joint_constraints/damping = 1.0
joint_constraints/impulse_clamp = 0.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D/Physical Bone mixamorig_RightFoot"]
transform = Transform3D(0.01, 1.50737e-10, 9.12129e-10, 0, 0.00258819, 0.00965926, -4.42378e-09, -0.00965926, 0.00258819, 6.02947e-10, 0.0103528, -0.038637)
shape = SubResource("CylinderShape3D_l2il6")
[node name="Collision" type="CollisionShape3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(9.83936, 0.264962, 1.76546, 0.249217, 9.58855, -2.82801, -1.76775, 2.82658, 9.42791, -12.7207, 21.3283, -142.579)
shape = SubResource("SphereShape3D_wnhib")
[node name="AnimationPlayer" type="AnimationPlayer" parent="Body"]
libraries = {

View File

@ -1,13 +1,13 @@
extends Area3D
@export var damage: int = 100
@export var damage: int = 20
signal body_part_hit(dam)
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass