From b28fdc0a94887669fed2c9a05f57a50ba9b693a6 Mon Sep 17 00:00:00 2001 From: Persson-dev Date: Sat, 24 Aug 2024 18:13:53 +0200 Subject: [PATCH] la trousse --- godot/Scenes/Characters/remy.tscn | 25 ++- godot/Scenes/Characters/remy_fpv.tscn | 224 ++++++++++++++++++++++++++ src/client/FirstPersonPlayer.cpp | 6 +- src/client/Player.cpp | 11 +- 4 files changed, 260 insertions(+), 6 deletions(-) create mode 100644 godot/Scenes/Characters/remy_fpv.tscn diff --git a/godot/Scenes/Characters/remy.tscn b/godot/Scenes/Characters/remy.tscn index c221138..639c0dc 100644 --- a/godot/Scenes/Characters/remy.tscn +++ b/godot/Scenes/Characters/remy.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=29 format=3 uid="uid://c8qr7bgsuv3fj"] +[gd_scene load_steps=32 format=3 uid="uid://c8qr7bgsuv3fj"] [ext_resource type="ArrayMesh" path="res://Assets/Models/Characters/Remy/Remy_Body.res" id="1_tfpbs"] [ext_resource type="ArrayMesh" path="res://Assets/Models/Characters/Remy/Remy_Bottoms.res" id="2_omx5l"] @@ -7,6 +7,7 @@ [ext_resource type="ArrayMesh" path="res://Assets/Models/Characters/Remy/Remy_Hair.res" id="5_u0ca1"] [ext_resource type="ArrayMesh" path="res://Assets/Models/Characters/Remy/Remy_Shoes.res" id="6_xg4n7"] [ext_resource type="ArrayMesh" path="res://Assets/Models/Characters/Remy/Remy_Tops.res" id="7_skjds"] +[ext_resource type="PackedScene" path="res://Scenes/Characters/remy_fpv.tscn" id="9_0cwor"] [ext_resource type="AnimationLibrary" path="res://Assets/Animations/Shooter_Pack.res" id="17_0rhm1"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_voxql"] @@ -216,6 +217,15 @@ bind/66/name = &"mixamorig_RightToe_End" bind/66/bone = -1 bind/66/pose = Transform3D(-99.0345, -0.159767, -13.8615, -13.8624, 1.14127, 99.028, -1.58735e-05, 99.9934, -1.1524, -18.7761, -41.9626, -2.95062) +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_8rx3k"] +albedo_color = Color(0, 0.4, 1, 1) + +[sub_resource type="CylinderMesh" id="CylinderMesh_spot0"] +material = SubResource("StandardMaterial3D_8rx3k") +top_radius = 0.05 +bottom_radius = 0.05 +height = 0.2 + [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_jv0gp"] animation = &"Shooter_Pack/Jump" @@ -309,6 +319,9 @@ graph_offset = Vector2(18, 52) [node name="Head" type="Node3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.55647, 0) +[node name="FPV" parent="Head" instance=ExtResource("9_0cwor")] +transform = Transform3D(-1, 0, -1.50996e-07, 0, 1, 0, 1.50996e-07, 0, -1, 0, -1.55647, 0) + [node name="CollisionShape3D" type="CollisionShape3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0) shape = SubResource("CapsuleShape3D_voxql") @@ -818,6 +831,16 @@ skin = SubResource("Skin_unkc0") mesh = ExtResource("7_skjds") skin = SubResource("Skin_unkc0") +[node name="Hand" type="BoneAttachment3D" parent="Armature/Skeleton3D"] +transform = Transform3D(-0.754949, -0.655201, -0.0276231, -0.655704, 0.753531, 0.0473583, -0.0102144, 0.0538656, -0.998496, -7.36985, 102.466, -285.249) +bone_name = "mixamorig_LeftHand" +bone_idx = 12 + +[node name="Pencil Case" type="MeshInstance3D" parent="Armature/Skeleton3D/Hand"] +transform = Transform3D(57.2088, -233.054, -180.036, 5.64897, 184.237, -236.696, 294.441, 41.7466, 39.5215, 23.2506, -3.13713, 16.4251) +mesh = SubResource("CylinderMesh_spot0") +skeleton = NodePath("../..") + [node name="AnimationPlayer" type="AnimationPlayer" parent="."] libraries = { "Shooter_Pack": ExtResource("17_0rhm1") diff --git a/godot/Scenes/Characters/remy_fpv.tscn b/godot/Scenes/Characters/remy_fpv.tscn new file mode 100644 index 0000000..1c76d81 --- /dev/null +++ b/godot/Scenes/Characters/remy_fpv.tscn @@ -0,0 +1,224 @@ +[gd_scene load_steps=4 format=3 uid="uid://cwbg6ekri5onf"] + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_4xaty"] +albedo_color = Color(0, 0.4, 1, 1) + +[sub_resource type="CylinderMesh" id="CylinderMesh_iro55"] +material = SubResource("StandardMaterial3D_4xaty") +top_radius = 0.05 +bottom_radius = 0.05 +height = 0.2 + +[sub_resource type="Skin" id="Skin_cysku"] +resource_name = "Skin" +bind_count = 67 +bind/0/name = &"mixamorig_Hips" +bind/0/bone = -1 +bind/0/pose = Transform3D(100, 0, 0, 0, 100, 4.37114e-06, 0, -4.37114e-06, 100, 0.0419201, -209.151, 1.41641) +bind/1/name = &"mixamorig_Spine" +bind/1/bone = -1 +bind/1/pose = Transform3D(99.9934, 1.15074, 4.26326e-08, -1.14498, 99.4929, -9.99272, -0.11499, 9.99206, 99.4995, -2.39798, -228.327, -17.5981) +bind/2/name = &"mixamorig_Spine1" +bind/2/bone = -1 +bind/2/pose = Transform3D(99.9992, 0.392417, 6.03961e-08, -0.392055, 99.907, -4.29468, -0.0168531, 4.29465, 99.9077, -0.483516, -252.552, -3.18282) +bind/3/name = &"mixamorig_Spine2" +bind/3/bone = -1 +bind/3/pose = Transform3D(99.983, -1.84448, 5.68434e-08, 1.83111, 99.258, 12.0204, -0.221714, -12.0184, 99.2749, 5.78559, -277.107, 42.4792) +bind/4/name = &"mixamorig_Neck" +bind/4/bone = -1 +bind/4/pose = Transform3D(99.8904, -4.68136, 0, 4.49289, 95.8689, 28.0886, -1.31493, -28.0578, 95.9741, 14.6175, -297.03, 92.2453) +bind/5/name = &"mixamorig_Head" +bind/5/bone = -1 +bind/5/pose = Transform3D(99.8904, -4.68136, 1.13687e-07, 4.49289, 95.8689, 28.0886, -1.31493, -28.0578, 95.9741, 14.6175, -320.219, 92.2453) +bind/6/name = &"mixamorig_HeadTop_End" +bind/6/bone = -1 +bind/6/pose = Transform3D(99.8904, -4.68135, 4.54747e-07, 4.49289, 95.8689, 28.0886, -1.31493, -28.0578, 95.9741, 16.2573, -359.996, 92.6064) +bind/7/name = &"mixamorig_RightEye" +bind/7/bone = -1 +bind/7/pose = Transform3D(99.8904, -4.68136, 1.13687e-07, 4.49289, 95.8689, 28.0886, -1.31493, -28.0578, 95.9741, 21.4989, -340.362, 80.9932) +bind/8/name = &"mixamorig_LeftEye" +bind/8/bone = -1 +bind/8/pose = Transform3D(99.8904, -4.68135, 6.82121e-07, 4.49289, 95.8689, 28.0886, -1.31493, -28.0578, 95.9741, 9.3221, -341.245, 80.9355) +bind/9/name = &"mixamorig_LeftShoulder" +bind/9/bone = -1 +bind/9/pose = Transform3D(-15.2443, -0.449328, -98.8302, 98.7873, 2.9119, -15.2509, 2.94636, -99.9566, -1.79057e-05, -2.88629, -21.8424, 298.665) +bind/10/name = &"mixamorig_LeftArm" +bind/10/bone = -1 +bind/10/pose = Transform3D(4.12623e-05, 2.54824e-06, -100, 100, -5.83008e-05, 4.52544e-05, -5.51343e-05, -100, -4.91009e-07, -10.2379, -38.5985, 299.932) +bind/11/name = &"mixamorig_LeftForeArm" +bind/11/bone = -1 +bind/11/pose = Transform3D(4.33707e-05, 4.42927e-06, -100, 100, -6.09941e-05, 4.73628e-05, -5.78276e-05, -100, -2.37204e-06, -10.2379, -93.7262, 299.932) +bind/12/name = &"mixamorig_LeftHand" +bind/12/bone = -1 +bind/12/pose = Transform3D(3.5985e-05, -2.95641e-06, -100, 100, -3.16651e-06, 3.99771e-05, 2.30722e-12, -100, 5.01367e-06, -10.2379, -146.5, 299.932) +bind/13/name = &"mixamorig_LeftHandMiddle1" +bind/13/bone = -1 +bind/13/pose = Transform3D(4.1275e-05, 2.33357e-06, -100, 100, -3.16651e-06, 4.52671e-05, 4.49066e-12, -100, -2.76313e-07, -10.2379, -174.244, 299.932) +bind/14/name = &"mixamorig_LeftHandMiddle2" +bind/14/bone = -1 +bind/14/pose = Transform3D(4.19282e-05, 2.98677e-06, -100, 100, -0.000450401, 4.59203e-05, -0.000447234, -100, -9.29715e-07, -10.2379, -181.175, 299.933) +bind/15/name = &"mixamorig_LeftHandMiddle3" +bind/15/bone = -1 +bind/15/pose = Transform3D(3.87006e-05, -2.4079e-07, -100, 100, -3.1665e-06, 4.26927e-05, -2.58102e-12, -100, 2.29805e-06, -10.2379, -188, 299.932) +bind/16/name = &"mixamorig_LeftHandMiddle4" +bind/16/bone = -1 +bind/16/pose = Transform3D(3.87007e-05, -2.4079e-07, -100, 100, -3.1665e-06, 4.26928e-05, -2.58102e-12, -100, 2.29805e-06, -10.238, -195.392, 299.932) +bind/17/name = &"mixamorig_LeftHandThumb1" +bind/17/bone = -1 +bind/17/pose = Transform3D(38.73, -22.3607, -89.4426, 77.4596, -44.7213, 44.7215, -49.9999, -86.6026, -5.63887e-05, 1.60829, 12.405, 335.71) +bind/18/name = &"mixamorig_LeftHandThumb2" +bind/18/bone = -1 +bind/18/pose = Transform3D(38.7299, -22.3607, -89.4427, 77.4597, -44.7213, 44.7215, -50, -86.6026, 3.09228e-05, 1.60861, 1.18065, 335.71) +bind/19/name = &"mixamorig_LeftHandThumb3" +bind/19/bone = -1 +bind/19/pose = Transform3D(38.7299, -22.3608, -89.4427, 77.4597, -44.7212, 44.7215, -49.9999, -86.6026, 0.000112777, 1.60875, -7.77524, 335.71) +bind/20/name = &"mixamorig_LeftHandThumb4" +bind/20/bone = -1 +bind/20/pose = Transform3D(38.7299, -22.3608, -89.4427, 77.4597, -44.7212, 44.7215, -49.9999, -86.6026, 9.09495e-05, 1.60865, -13.5698, 335.71) +bind/21/name = &"mixamorig_LeftHandIndex1" +bind/21/bone = -1 +bind/21/pose = Transform3D(4.27364e-05, 1.56652e-06, -100, 100, -3.16651e-06, 4.67285e-05, 4.24015e-12, -100, 4.90744e-07, -5.08588, -174.99, 299.478) +bind/22/name = &"mixamorig_LeftHandIndex2" +bind/22/bone = -1 +bind/22/pose = Transform3D(4.40478e-05, 5.10635e-06, -100, 100, -3.16651e-06, 4.80399e-05, 5.79937e-12, -100, -3.04909e-06, -5.0859, -182.053, 299.478) +bind/23/name = &"mixamorig_LeftHandIndex3" +bind/23/bone = -1 +bind/23/pose = Transform3D(4.33923e-05, 4.4509e-06, -100, 100, -3.16651e-06, 4.73844e-05, 5.51495e-12, -100, -2.39364e-06, -5.08587, -188.548, 299.478) +bind/24/name = &"mixamorig_LeftHandIndex4" +bind/24/bone = -1 +bind/24/pose = Transform3D(4.33923e-05, 4.4509e-06, -100, 100, -3.16651e-06, 4.73844e-05, 5.51495e-12, -100, -2.39364e-06, -5.08584, -195.142, 299.478) +bind/25/name = &"mixamorig_LeftHandRing1" +bind/25/bone = -1 +bind/25/pose = Transform3D(4.35421e-05, 6.40099e-06, -100, 100, -3.16651e-06, 4.75342e-05, 6.38163e-12, -100, -4.34373e-06, -14.479, -171.984, 300.012) +bind/26/name = &"mixamorig_LeftHandRing2" +bind/26/bone = -1 +bind/26/pose = Transform3D(4.49878e-05, 6.04632e-06, -100, 100, -3.16651e-06, 4.89799e-05, 6.22207e-12, -100, -3.98906e-06, -14.4789, -178.294, 300.012) +bind/27/name = &"mixamorig_LeftHandRing3" +bind/27/bone = -1 +bind/27/pose = Transform3D(-0.000108406, -0.000147347, -100, 100, -3.1665e-06, -0.000104414, 1.66702e-10, -100, 0.000149405, -14.4782, -184.653, 300.012) +bind/28/name = &"mixamorig_LeftHandRing4" +bind/28/bone = -1 +bind/28/pose = Transform3D(4.06522e-05, 1.71072e-06, -100, 100, -3.16659e-06, 4.46443e-05, -8.28545e-11, -100, 3.46547e-07, -14.4789, -191.691, 300.011) +bind/29/name = &"mixamorig_LeftHandPinky1" +bind/29/bone = -1 +bind/29/pose = Transform3D(2.13955e-05, -9.76242e-06, -100, 100, -3.16651e-06, 2.53876e-05, 8.51037e-13, -100, 1.18197e-05, -19.0188, -168.406, 299.491) +bind/30/name = &"mixamorig_LeftHandPinky2" +bind/30/bone = -1 +bind/30/pose = Transform3D(0.000229854, 0.000190912, -100, 100, -0.000738696, 0.000233845, -0.000735529, -100, -0.000188856, -19.0198, -174.94, 299.493) +bind/31/name = &"mixamorig_LeftHandPinky3" +bind/31/bone = -1 +bind/31/pose = Transform3D(3.4283e-05, -4.65839e-06, -100, 100, -3.16654e-06, 3.82751e-05, -3.8009e-12, -100, 6.71569e-06, -19.0188, -179.091, 299.491) +bind/32/name = &"mixamorig_LeftHandPinky4" +bind/32/bone = -1 +bind/32/pose = Transform3D(3.4283e-05, -4.65842e-06, -100, 100, -3.16654e-06, 3.82751e-05, -3.80091e-12, -100, 6.71572e-06, -19.0188, -184.655, 299.491) +bind/33/name = &"mixamorig_RightShoulder" +bind/33/bone = -1 +bind/33/pose = Transform3D(-20.1629, 0.35292, 97.9456, -97.9306, 1.71404, -20.166, -1.74999, -99.9847, 1.80194e-05, 2.8144, -19.4598, 299.201) +bind/34/name = &"mixamorig_RightArm" +bind/34/bone = -1 +bind/34/pose = Transform3D(8.68049e-05, -1.24537e-05, 100, -100, -1.86276e-07, 8.8915e-05, -3.72535e-07, -100, -1.15962e-05, 12.104, -39.589, 299.94) +bind/35/name = &"mixamorig_RightForeArm" +bind/35/bone = -1 +bind/35/pose = Transform3D(7.96092e-05, -4.90495e-06, 100, -100, -5.58804e-07, 8.17193e-05, 2.57644e-13, -100, -4.0475e-06, 12.104, -95.4317, 299.94) +bind/36/name = &"mixamorig_RightHand" +bind/36/bone = -1 +bind/36/pose = Transform3D(8.07296e-05, -6.02537e-06, 100, -100, -5.58804e-07, 8.28397e-05, -6.43239e-13, -100, -5.16792e-06, 12.1041, -145.745, 299.94) +bind/37/name = &"mixamorig_RightHandMiddle1" +bind/37/bone = -1 +bind/37/pose = Transform3D(7.74089e-05, -2.70475e-06, 100, -100, -5.58804e-07, 7.95191e-05, 1.92722e-12, -100, -1.8473e-06, 12.1041, -171.811, 299.94) +bind/38/name = &"mixamorig_RightHandMiddle2" +bind/38/bone = -1 +bind/38/pose = Transform3D(7.86091e-05, -3.90488e-06, 100, -100, -5.58804e-07, 8.07192e-05, 1.04055e-12, -100, -3.04743e-06, 12.1041, -177.971, 299.94) +bind/39/name = &"mixamorig_RightHandMiddle3" +bind/39/bone = -1 +bind/39/pose = Transform3D(7.67034e-05, -1.9992e-06, 100, -100, -5.58804e-07, 7.88136e-05, 2.47705e-12, -100, -1.14175e-06, 12.104, -185.25, 299.94) +bind/40/name = &"mixamorig_RightHandMiddle4" +bind/40/bone = -1 +bind/40/pose = Transform3D(7.67034e-05, -1.9992e-06, 100, -100, -5.58804e-07, 7.88136e-05, 2.47705e-12, -100, -1.14175e-06, 12.1041, -192.71, 299.94) +bind/41/name = &"mixamorig_RightHandThumb1" +bind/41/bone = -1 +bind/41/pose = Transform3D(38.7301, 22.3611, 89.4425, -77.4593, -44.7216, 44.7218, 50.0004, -86.6023, -2.00089e-05, -0.744326, 14.7863, 333.975) +bind/42/name = &"mixamorig_RightHandThumb2" +bind/42/bone = -1 +bind/42/pose = Transform3D(38.7302, 22.3611, 89.4425, -77.4593, -44.7216, 44.7218, 50.0004, -86.6023, -4.72937e-05, -0.744248, 4.43724, 333.976) +bind/43/name = &"mixamorig_RightHandThumb3" +bind/43/bone = -1 +bind/43/pose = Transform3D(38.7302, 22.3611, 89.4425, -77.4594, -44.7214, 44.7219, 50.0002, -86.6024, 0.000150976, -0.744501, -4.13842, 333.976) +bind/44/name = &"mixamorig_RightHandThumb4" +bind/44/bone = -1 +bind/44/pose = Transform3D(38.73, 22.3612, 89.4426, -77.4592, -44.7218, 44.7217, 50.0006, -86.6022, 5.82077e-05, -0.744883, -10.2759, 333.976) +bind/45/name = &"mixamorig_RightHandIndex1" +bind/45/bone = -1 +bind/45/pose = Transform3D(8.07296e-05, -5.97738e-06, 100, -100, -5.58804e-07, 8.28397e-05, -6.04494e-13, -100, -5.11993e-06, 6.99748, -172.348, 299.393) +bind/46/name = &"mixamorig_RightHandIndex2" +bind/46/bone = -1 +bind/46/pose = Transform3D(7.71745e-05, -2.47024e-06, 100, -100, -5.58804e-07, 7.92846e-05, 2.12874e-12, -100, -1.61279e-06, 6.99749, -179.441, 299.393) +bind/47/name = &"mixamorig_RightHandIndex3" +bind/47/bone = -1 +bind/47/pose = Transform3D(7.77097e-05, -3.00546e-06, 100, -100, -5.58804e-07, 7.98198e-05, 1.72759e-12, -100, -2.14801e-06, 6.99748, -186.855, 299.393) +bind/48/name = &"mixamorig_RightHandIndex4" +bind/48/bone = -1 +bind/48/pose = Transform3D(7.77097e-05, -3.00546e-06, 100, -100, -5.58804e-07, 7.98198e-05, 1.72759e-12, -100, -2.14801e-06, 6.99744, -192.378, 299.393) +bind/49/name = &"mixamorig_RightHandRing1" +bind/49/bone = -1 +bind/49/pose = Transform3D(8.42064e-05, -8.73814e-06, 100, -100, -5.58805e-07, 8.63165e-05, -2.92757e-12, -100, -7.88069e-06, 16.0881, -169.833, 299.941) +bind/50/name = &"mixamorig_RightHandRing2" +bind/50/bone = -1 +bind/50/pose = Transform3D(8.37108e-05, -9.00656e-06, 100, -100, 0.000445899, 8.58209e-05, -0.000446457, -100, -8.14873e-06, 16.0881, -176.691, 299.94) +bind/51/name = &"mixamorig_RightHandRing3" +bind/51/bone = -1 +bind/51/pose = Transform3D(6.33971e-05, 1.13072e-05, 100, -100, -5.58695e-07, 6.55072e-05, -3.49916e-11, -100, 1.21646e-05, 16.088, -183.526, 299.941) +bind/52/name = &"mixamorig_RightHandRing4" +bind/52/bone = -1 +bind/52/pose = Transform3D(0.000253585, -0.000178882, 100, -100, 0.000506614, 0.000255696, -0.000507173, -100, -0.000178023, 16.0889, -189.544, 299.94) +bind/53/name = &"mixamorig_RightHandPinky1" +bind/53/bone = -1 +bind/53/pose = Transform3D(6.46733e-05, 1.04791e-05, 100, -100, -5.58803e-07, 6.67834e-05, 1.00308e-11, -100, 1.13366e-05, 20.6451, -166.735, 299.442) +bind/54/name = &"mixamorig_RightHandPinky2" +bind/54/bone = -1 +bind/54/pose = Transform3D(0.000101329, -2.66244e-05, 100, -100, -5.58805e-07, 0.000103439, -2.16801e-11, -100, -2.5767e-05, 20.6453, -172.674, 299.442) +bind/55/name = &"mixamorig_RightHandPinky3" +bind/55/bone = -1 +bind/55/pose = Transform3D(8.98217e-05, -1.51174e-05, 100, -100, -5.58805e-07, 9.19318e-05, -8.88232e-12, -100, -1.426e-05, 20.6452, -176.439, 299.442) +bind/56/name = &"mixamorig_RightHandPinky4" +bind/56/bone = -1 +bind/56/pose = Transform3D(-8.98231e-05, 0.000164526, 100, -100, -0.000958654, -8.77114e-05, 0.000958095, -100, 0.000165384, 20.6444, -182.807, 299.444) +bind/57/name = &"mixamorig_LeftUpLeg" +bind/57/bone = -1 +bind/57/pose = Transform3D(-99.9989, 0.47673, 0.00835485, -0.476803, -99.9831, -1.77224, -9.66054e-05, -1.77226, 99.9843, 17.5511, 195.39, 2.21604) +bind/58/name = &"mixamorig_LeftLeg" +bind/58/bone = -1 +bind/58/pose = Transform3D(-99.9986, -0.525834, -0.0315128, 0.526778, -99.8177, -6.01202, 0.000156614, -6.0121, 99.8191, 18.6545, 109.769, 6.88281) +bind/59/name = &"mixamorig_LeftFoot" +bind/59/bone = -1 +bind/59/pose = Transform3D(-99.6558, -5.47894, 6.22056, 8.2894, -65.8684, 74.7839, 1.77351e-05, 75.0422, 66.0959, 20.151, 18.7568, -14.9342) +bind/60/name = &"mixamorig_LeftToeBase" +bind/60/bone = -1 +bind/60/pose = Transform3D(-99.9851, -0.0227067, -1.72832, -1.72847, 1.31393, 99.9764, 8.68106e-06, 99.9914, -1.31411, 21.5432, -18.5528, -3.02252) +bind/61/name = &"mixamorig_LeftToe_End" +bind/61/bone = -1 +bind/61/pose = Transform3D(-99.9851, -0.022726, -1.72834, -1.72849, 1.31394, 99.9764, -1.00826e-05, 99.9914, -1.31412, 21.5432, -37.6176, -3.02251) +bind/62/name = &"mixamorig_RightUpLeg" +bind/62/bone = -1 +bind/62/pose = Transform3D(-99.9979, -0.647505, 0.00783087, 0.647552, -99.9909, 1.18213, 0.00017401, 1.18215, 99.993, -17.2208, 194.856, -1.04611) +bind/63/name = &"mixamorig_RightLeg" +bind/63/bone = -1 +bind/63/pose = Transform3D(-99.9976, 0.694097, 0.0420051, -0.695367, -99.8151, -6.03798, 1.62395e-05, -6.03812, 99.8175, -18.6954, 109.584, 6.89046) +bind/64/name = &"mixamorig_RightFoot" +bind/64/bone = -1 +bind/64/pose = Transform3D(-99.5418, 6.2595, -7.22856, -9.56208, -65.1618, 75.2496, -1.09139e-05, 75.596, 65.4618, -20.3771, 18.3728, -15.1041) +bind/65/name = &"mixamorig_RightToeBase" +bind/65/bone = -1 +bind/65/pose = Transform3D(-99.0345, -0.159739, -13.8615, -13.8624, 1.14128, 99.028, 1.17808e-05, 99.9934, -1.1524, -18.7761, -22.2602, -2.95062) +bind/66/name = &"mixamorig_RightToe_End" +bind/66/bone = -1 +bind/66/pose = Transform3D(-99.0345, -0.159767, -13.8615, -13.8624, 1.14127, 99.028, -1.58735e-05, 99.9934, -1.1524, -18.7761, -41.9626, -2.95062) + +[node name="Arms" type="Node3D"] +transform = Transform3D(-1, 0, -1.50996e-07, 0, 1, 0, 1.50996e-07, 0, -1, 0, 0, 0) + +[node name="Pencil Case" type="MeshInstance3D" parent="."] +transform = Transform3D(0.98209, 0.177463, 0.0632861, 1.42223e-07, 0.335895, -0.941899, -0.18841, 0.92503, 0.32988, -0.376089, 1.33587, 0.356095) +cast_shadow = 0 +mesh = SubResource("CylinderMesh_iro55") +skin = SubResource("Skin_cysku") diff --git a/src/client/FirstPersonPlayer.cpp b/src/client/FirstPersonPlayer.cpp index 8892685..e31519a 100644 --- a/src/client/FirstPersonPlayer.cpp +++ b/src/client/FirstPersonPlayer.cpp @@ -115,11 +115,11 @@ void FirstPersonPlayer::UpdateBobbing(float a_Delta) { void FirstPersonPlayer::UpdateCamera(const InputEventMouseMotion& a_Event) { m_Player->rotate_y(-a_Event.get_relative().x * SENSITIVITY); - m_Camera->rotate_x(-a_Event.get_relative().y * SENSITIVITY); + m_Head->rotate_x(-a_Event.get_relative().y * SENSITIVITY); - float rotationX = m_Camera->get_rotation().x; + float rotationX = m_Head->get_rotation().x; rotationX = CLAMP(rotationX, Math::deg_to_rad(-80.0), Math::deg_to_rad(80.0)); - m_Camera->set_rotation({rotationX, m_Camera->get_rotation().y, m_Camera->get_rotation().z}); + m_Head->set_rotation({rotationX, m_Head->get_rotation().y, m_Head->get_rotation().z}); } void FirstPersonPlayer::UpdatePosition(float delta) { diff --git a/src/client/Player.cpp b/src/client/Player.cpp index 5cf4eca..f6d716f 100644 --- a/src/client/Player.cpp +++ b/src/client/Player.cpp @@ -104,9 +104,16 @@ void Player::SetModelVisible(bool a_Visible) { auto* skeleton = m_Mesh->get_node("Skeleton3D"); for (int i = 0; i < skeleton->get_child_count(); i++) { auto* bodyPart = Object::cast_to(skeleton->get_child(i)); - bodyPart->set_cast_shadows_setting(a_Visible ? GeometryInstance3D::ShadowCastingSetting::SHADOW_CASTING_SETTING_ON - : GeometryInstance3D::ShadowCastingSetting::SHADOW_CASTING_SETTING_SHADOWS_ONLY); + if (bodyPart) + bodyPart->set_cast_shadows_setting(a_Visible + ? GeometryInstance3D::ShadowCastingSetting::SHADOW_CASTING_SETTING_ON + : GeometryInstance3D::ShadowCastingSetting::SHADOW_CASTING_SETTING_SHADOWS_ONLY); } + + // TODO: dirty, make it recursive + auto* pencilCase = m_Mesh->get_node("Skeleton3D/Hand/Pencil Case"); + pencilCase->set_cast_shadows_setting(a_Visible ? GeometryInstance3D::ShadowCastingSetting::SHADOW_CASTING_SETTING_ON + : GeometryInstance3D::ShadowCastingSetting::SHADOW_CASTING_SETTING_SHADOWS_ONLY); } Vector3 Player::GetCameraRotation() const {