Better ragdoll

This commit is contained in:
2025-01-28 09:42:09 +01:00
parent 06252cf8d6
commit 4d856842ff
37 changed files with 1986 additions and 56 deletions

View File

@ -33,6 +33,7 @@ func die():
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)

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=27 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,6 +258,8 @@ blend_shape_mode = 0
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_j3emx"]
albedo_color = Color(0, 0, 1, 1)
[sub_resource type="SphereShape3D" id="SphereShape3D_axep3"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_0ptuo"]
radius = 11.7055
height = 28.953
@ -310,13 +312,13 @@ height = 15.7216
radius = 4.05995
height = 40.5995
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_usdnr"]
radius = 4.2099
height = 42.099
[sub_resource type="CylinderShape3D" id="CylinderShape3D_2binp"]
height = 42.0
radius = 3.0
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_p687f"]
radius = 1.57216
height = 15.7216
[sub_resource type="CylinderShape3D" id="CylinderShape3D_l2il6"]
height = 27.0
radius = 1.75
[sub_resource type="SphereShape3D" id="SphereShape3D_wnhib"]
radius = 1.2
@ -1411,15 +1413,18 @@ 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="CollisionShape3D" type="CollisionShape3D" parent="Body/Armature/Skeleton3D/BoneAttachment3D/HeadCollision"]
shape = SubResource("SphereShape3D_axep3")
[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.81951, 12.756, -10.5629, 98.619, 1.31497, 0.290619, -87.4646)
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, -1.13523e-08, 1.07102e-08, 0.0499954)
body_offset = Transform3D(100, -0.0695305, -0.00859928, -3.8147e-06, 12.2744, -99.2438, 0.0700531, 99.2438, 12.2744, 0.000431061, 4.96174, -0.613665)
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.50562e-08, -7.45058e-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
@ -1431,12 +1436,12 @@ transform = Transform3D(0.01, 0, 0, 0, -4.37114e-10, 0.01, 0, -0.01, -4.37114e-1
shape = SubResource("CapsuleShape3D_0ptuo")
[node name="Physical Bone mixamorig_Spine" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(80.9412, -58.546, -4.56913, 57.6046, 80.6695, -13.1964, 11.4119, 8.0493, 99.0201, 2.40599, 0.973751, -98.2036)
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, -3.07684e-09, -4.50191e-09, 0.0586601)
body_offset = Transform3D(100, 7.62939e-06, 5.24521e-06, 9.53674e-07, -7.62939e-06, -100, -1.14441e-05, 100, -8.58307e-06, 0, 5.866, 9.53674e-07)
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.06134e-09, 2.2377e-09, 0.0586601)
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
@ -1448,12 +1453,12 @@ transform = Transform3D(0.0318071, 3.86358e-14, 4.9738e-14, -2.13163e-14, -1.629
shape = SubResource("CapsuleShape3D_126jt")
[node name="Physical Bone mixamorig_Head" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(-97.8019, 4.4733, 20.366, -15.8369, -79.471, -58.5966, 13.5638, -60.5339, 78.4326, -13.8193, 23.4986, -143.635)
transform = Transform3D(-97.8019, 4.4733, 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, 1.9129e-08, -1.49012e-07, 0.0981528)
body_offset = Transform3D(-100, -0.00219917, -0.000777245, -5.24521e-06, 33.8066, -94.1122, 0.00232792, -94.1122, -33.8066, 7.82013e-05, 9.23738, 3.3182)
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.8329e-10, -1.37836e-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
@ -1469,8 +1474,8 @@ transform = Transform3D(86.1165, 14.0252, -48.8594, -45.4995, 64.1262, -61.787,
collision_layer = 4
collision_mask = 4
joint_type = 1
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.98524e-08, -6.58399e-08, 0.137023)
body_offset = Transform3D(100, -1.90735e-05, -1.33514e-05, 3.8147e-06, 100, -7.62939e-06, 5.72205e-06, 3.8147e-06, 100, 3.8147e-06, 7.62939e-06, -13.7023)
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.70431e-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
@ -1482,12 +1487,12 @@ transform = Transform3D(0.01, 0, 0, 0, 0.00997432, -0.000716193, 0, 0.000716193,
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.56701, 1.36486, 46.9033, -104.66)
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, -7.10269e-08, 7.36604e-08, 0.138072)
body_offset = Transform3D(100, 2.86102e-05, -3.8147e-06, -7.62939e-06, -7.62939e-06, -100, -3.8147e-06, 100, 1.90735e-06, 7.62939e-06, 13.8072, -7.62939e-06)
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
@ -1499,12 +1504,12 @@ transform = Transform3D(0.01, 0, 0, 0, -4.37114e-10, 0.01, 0, -0.01, -4.37114e-1
shape = SubResource("CapsuleShape3D_2k34c")
[node name="Physical Bone mixamorig_LeftHand" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(9.11564, -98.6768, 13.4089, 23.9481, -10.8976, -96.4766, 96.6612, 12.0056, 22.6379, -10.9684, 56.2242, -106.442)
transform = Transform3D(9.11563, -98.6768, 13.4089, 23.9481, -10.8976, -96.4766, 96.6612, 12.0056, 22.6379, -10.9684, 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, -8.00937e-08, -9.35979e-08, 0.0264903)
body_offset = Transform3D(-58.5197, 57.9894, 56.6805, 5.72205e-06, 69.899, -71.5132, -81.0891, -41.8493, -40.9047, -1.50148, 1.89441, 1.08356)
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.19564e-08, -9.40636e-08, 0.0264903)
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
@ -1519,8 +1524,8 @@ transform = Transform3D(30.7246, 72.8896, 61.1809, 93.7855, -34.092, -6.48192, 1
collision_layer = 4
collision_mask = 4
joint_type = 1
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.69878e-08, 1.16652e-07, 0.137023)
body_offset = Transform3D(100, -9.53674e-06, 1.23978e-05, 6.67572e-06, 6.67572e-06, -100, -1.90735e-06, 100, 2.6226e-05, 0, 13.7023, -1.52588e-05)
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
@ -1532,12 +1537,12 @@ transform = Transform3D(0.01, 0, 0, 0, -4.37114e-10, 0.01, 0, -0.01, -4.37114e-1
shape = SubResource("CapsuleShape3D_8vkyv")
[node name="Physical Bone mixamorig_RightForeArm" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(24.3552, 37.4063, 89.4851, -25.0101, 91.5653, -31.4688, -93.7087, -14.716, 31.6563, -48.2682, 3.93748, -103.698)
transform = Transform3D(24.3552, 37.4063, 89.4852, -25.0101, 91.5653, -31.4688, -93.7087, -14.716, 31.6563, -48.2682, 3.93748, -103.698)
collision_layer = 4
collision_mask = 4
joint_type = 1
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.7201e-08, 1.55946e-08, 0.138072)
body_offset = Transform3D(100, -1.14441e-05, 1.38283e-05, -1.90735e-06, 100, 3.8147e-06, 2.86102e-06, 0, 100, -7.62939e-06, -2.08616e-06, -13.8072)
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
@ -1549,12 +1554,12 @@ transform = Transform3D(0.01, 0, 0, 0, 0.00999714, -0.000239087, 0, 0.000239087,
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.05124, 88.6726, -45.9527, 45.1645, 39.0097, 80.2397, -24.5745, 26.0951, -105.517)
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, -8.75443e-08, 1.06171e-07, 0.0264903)
body_offset = Transform3D(-58.5197, -57.9893, -56.6805, -5.24521e-06, 69.8991, -71.5131, 81.0891, -41.8492, -40.9048, 1.50149, 1.8944, 1.08359)
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.51926e-09, 2.77534e-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
@ -1565,12 +1570,12 @@ transform = Transform3D(0.01, 0, 0, 0, 0.00693402, 0.00720551, 0, -0.00720551, 0
shape = SubResource("CapsuleShape3D_1m8r5")
[node name="Physical Bone mixamorig_LeftUpLeg" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(-96.1773, -26.2684, 7.73901, -23.4203, 64.2554, -72.957, 14.1919, -71.9806, -67.9513, 5.83707, 19.601, -60.9754)
transform = Transform3D(-96.1773, -26.2683, 7.73901, -23.4203, 64.2554, -72.957, 14.1919, -71.9806, -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.04032e-08, -7.74372e-09, 0.202997)
body_offset = Transform3D(100, -3.8147e-06, 3.8147e-06, 3.8147e-06, 3.8147e-06, -100, 1.04904e-05, 100, 3.8147e-06, -3.8147e-06, 20.2997, 0)
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.78612e-08, -7.74373e-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
@ -1586,8 +1591,8 @@ transform = Transform3D(-97.5216, -11.6193, -18.8291, -22.0483, 58.1427, 78.3154
collision_layer = 4
collision_mask = 4
joint_type = 1
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.01399e-09, -1.30455e-08, 0.210495)
body_offset = Transform3D(100, 1.90735e-06, 7.62939e-06, 3.8147e-06, 3.8147e-06, -100, 9.53674e-07, 100, 1.52588e-05, -1.90735e-06, 21.0495, -1.90735e-06)
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.01575e-09, -2.10752e-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
@ -1599,12 +1604,12 @@ transform = Transform3D(0.01, 0, 0, 0, -4.37114e-10, 0.01, 0, -0.01, -4.37114e-1
shape = SubResource("CapsuleShape3D_vwdij")
[node name="Physical Bone mixamorig_LeftFoot" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(-93.6712, -34.5296, 5.78096, -34.9451, 91.207, -21.4506, 2.13418, -22.1132, -97.501, 11.7385, 3.12728, -14.5678)
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, -1.23265e-08, 3.20267e-08, 0.078608)
body_offset = Transform3D(100, 1.33514e-05, -8.58307e-06, -7.62939e-06, -9.53674e-06, -100, -7.62939e-06, 100, -2.86102e-05, 1.90735e-06, 7.8608, -9.53674e-07)
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.53809e-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
@ -1615,12 +1620,12 @@ transform = Transform3D(0.01, 0, 0, 0, -4.37114e-10, 0.01, 0, -0.01, -4.37114e-1
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.9709, -61.3651, -76.122, -11.4062, 7.37456, -61.646)
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, 3.24821e-08, 1.54874e-08, 0.202997)
body_offset = Transform3D(100, -7.62939e-06, -1.90735e-06, 5.72205e-06, -7.62939e-06, -100, 7.62939e-06, 100, -7.62939e-06, -2.86102e-06, 20.2997, 0)
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
@ -1632,12 +1637,12 @@ transform = Transform3D(0.01, 0, 0, 0, -4.37114e-10, 0.01, 0, -0.01, -4.37114e-1
shape = SubResource("CapsuleShape3D_a81km")
[node name="Physical Bone mixamorig_RightLeg" type="PhysicalBone3D" parent="Body/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
transform = Transform3D(-91.8175, -23.5087, -31.8887, -36.0103, 83.0805, 42.4369, 16.517, 50.4478, -84.7479, -8.44487, 11.0604, -28.3544)
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, -3.76182e-09, -1.02385e-07, 0.210495)
body_offset = Transform3D(100, -1.90735e-06, 8.58307e-06, -2.86102e-06, 1.14441e-05, -100, 9.53674e-06, 100, 3.05176e-05, -1.43051e-06, 21.0495, 3.8147e-06)
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.06082e-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
@ -1646,23 +1651,23 @@ 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("CapsuleShape3D_usdnr")
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, -1.66525e-08, 1.9909e-08, 0.078608)
body_offset = Transform3D(100, 1.33514e-05, -7.62939e-06, -7.62939e-06, -2.67029e-05, -100, -1.90735e-06, 100, -4.95911e-05, 2.26498e-06, 7.8608, 1.90735e-06)
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.24152e-08, -2.70387e-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, 0, 0, 0, -4.37114e-10, 0.01, 0, -0.01, -4.37114e-10, 0, 0, 0)
shape = SubResource("CapsuleShape3D_p687f")
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)

File diff suppressed because one or more lines are too long

View File

@ -2564,4 +2564,9 @@ libraries = {
[node name="Bullets" type="Node3D" parent="."]
[node name="Objects" type="Node3D" parent="."]
[node name="ObjectsSpawner" type="MultiplayerSpawner" parent="."]
spawn_path = NodePath("../Objects")
[connection signal="body_part_hit" from="Dummy/Body/Armature/Skeleton3D/BoneAttachment3D/HeadCollision" to="Dummy" method="_on_head_collision_body_part_hit"]

View File

@ -19,9 +19,9 @@ func shoot() -> Error:
return ERR_CANT_OPEN
var node: MeshInstance3D = scene.instantiate()
node.init(bullet_start_node.global_position, bullet_end_node.global_position)
var root := get_tree().get_root()
root.add_child(node)
node.init(bullet_start_node.position, bullet_end_node.position)
#var root := get_tree().get_root()
bullet_start_node.add_child(node)
return OK
else:
push_warning("Couldn't generate a bullet trace, no distance node found")

View File

@ -4,10 +4,11 @@
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ybqvs"]
transparency = 1
albedo_color = Color(0.917767, 0.596302, 0, 1)
albedo_color = Color(0.300204, 0.908317, 1.54018e-06, 0.458824)
emission_enabled = true
emission = Color(0.454139, 0.861507, 0, 1)
emission_energy_multiplier = 4.0
emission_energy_multiplier = 16.0
distance_fade_min_distance = 2.0
[node name="BulletTrailGeneric" type="MeshInstance3D"]
material_override = SubResource("StandardMaterial3D_ybqvs")