rename player things

This commit is contained in:
Teatov 2025-08-29 22:16:14 +10:00
parent d7dcb41430
commit 9ccd131db1
11 changed files with 173 additions and 145 deletions

View File

@ -7,6 +7,20 @@ current = true
fov = 25.0
script = ExtResource("1_r5jk0")
_listener = NodePath("AudioListener3D")
_height_offset = null
_distance = null
_fov = null
_angle_degrees = null
_aim_offset_factor_mouse = null
_aim_offset_factor_controller = null
_aim_damping = null
_damage_shake_duration = null
_damage_shake_ease = null
_damage_shake_amplitude = null
_damage_shake_frequency = null
_hit_shake_fov = null
_hit_shake_duration = null
_hit_shake_ease = null
[node name="AudioListener3D" type="AudioListener3D" parent="."]
top_level = true

View File

@ -10,8 +10,8 @@
[ext_resource type="Script" uid="uid://bmbbkpkqtugwy" path="res://scripts/effects/bones/bone_flipper.gd" id="6_oprun"]
[ext_resource type="AnimationLibrary" uid="uid://d32ucj640bbrw" path="res://assets/models/characters/batrix/animations/batrix_gp_generic.gltf" id="7_oprun"]
[ext_resource type="Script" uid="uid://clks186ll0joi" path="res://scripts/gameplay/player/player_stats.gd" id="7_wqfne"]
[ext_resource type="Script" uid="uid://5vgfsrafb8ud" path="res://scripts/gameplay/player/player_movement_handler.gd" id="8_wnwbv"]
[ext_resource type="Script" uid="uid://c131c3hcbmu77" path="res://scripts/gameplay/player/player_aiming_handler.gd" id="9_gl8cc"]
[ext_resource type="Script" uid="uid://5vgfsrafb8ud" path="res://scripts/gameplay/player/player_mover.gd" id="8_wnwbv"]
[ext_resource type="Script" uid="uid://c131c3hcbmu77" path="res://scripts/gameplay/player/player_aimer.gd" id="9_gl8cc"]
[ext_resource type="PackedScene" uid="uid://c8gqrealje3o" path="res://scenes/effects/shadow_decal.tscn" id="9_vgb3d"]
[ext_resource type="AudioStream" uid="uid://d3mrapl1f6gx2" path="res://assets/sfx/player/player_hurt.wav" id="10_qfm1y"]
[ext_resource type="AudioStream" uid="uid://eu1bk0vpwvvu" path="res://assets/sfx/player/player_hit_base.wav" id="11_l71n6"]
@ -138,14 +138,14 @@ is_hemisphere = true
[sub_resource type="AudioStreamPolyphonic" id="AudioStreamPolyphonic_qfm1y"]
[node name="Player" type="CharacterBody3D" node_paths=PackedStringArray("attack", "stats", "movement", "aiming", "_cursor")]
[node name="Player" type="CharacterBody3D" node_paths=PackedStringArray("attack", "stats", "mover", "aimer", "_cursor")]
collision_layer = 16
script = ExtResource("1_xt3i8")
cursor_color = Color(0.964706, 0.870588, 0.917647, 1)
attack = NodePath("Attacker")
stats = NodePath("PlayerStats")
movement = NodePath("PlayerMovementHandler")
aiming = NodePath("PlayerAimingHandler")
mover = NodePath("PlayerMover")
aimer = NodePath("PlayerAimer")
_cursor = NodePath("PlayerCursor")
[node name="CollisionShape" type="CollisionShape3D" parent="."]
@ -156,8 +156,8 @@ debug_color = Color(0, 0.6, 0.7, 0.42)
[node name="Model" parent="." instance=ExtResource("3_f1ej7")]
[node name="Skeleton3D" parent="Model/Armature" index="0"]
bones/0/position = Vector3(-0.543087, 1.07749, -0.0953801)
bones/0/rotation = Quaternion(0.715651, -0.153718, -0.665155, -0.147592)
bones/0/position = Vector3(-0.509322, 0.994931, -0.0478182)
bones/0/rotation = Quaternion(0.709228, -0.0727934, -0.698967, -0.056058)
bones/0/scale = Vector3(1, 1, 1)
bones/1/position = Vector3(-9.75365e-05, 0.0319142, -0.124525)
bones/1/rotation = Quaternion(-0.000141591, 0.789452, 0.613812, 0.000224233)
@ -165,55 +165,55 @@ bones/1/scale = Vector3(1, 1, 1)
bones/2/rotation = Quaternion(6.24507e-10, 4.41808e-08, -6.03351e-10, 1)
bones/2/scale = Vector3(1, 1, 1)
bones/3/rotation = Quaternion(1.74623e-10, -2.60798e-10, -1.30968e-10, 1)
bones/4/position = Vector3(-0.0307676, 0.949138, -0.0536981)
bones/4/rotation = Quaternion(0.292034, -0.324367, -0.10176, 0.89395)
bones/4/position = Vector3(0.0410619, 0.92757, -0.0356457)
bones/4/rotation = Quaternion(0.223396, -0.0946728, 0.0350542, 0.969486)
bones/5/position = Vector3(6.05363e-09, 0.111695, -8.19564e-08)
bones/5/rotation = Quaternion(0.0668158, -0.104105, 0.256406, 0.958621)
bones/6/rotation = Quaternion(-0.419502, -0.119674, 0.0177526, 0.899656)
bones/7/rotation = Quaternion(0.32695, 0.282956, -0.261079, 0.863063)
bones/5/rotation = Quaternion(0.0735332, -0.199554, 0.125582, 0.96902)
bones/6/rotation = Quaternion(-0.419307, -0.128549, 0.021893, 0.898431)
bones/7/rotation = Quaternion(0.350038, 0.103815, -0.281842, 0.887277)
bones/7/scale = Vector3(1, 1, 1)
bones/8/rotation = Quaternion(-0.245724, 0.298751, 0.1484, 0.910134)
bones/8/rotation = Quaternion(-0.205147, 0.350995, 0.0975189, 0.908409)
bones/9/rotation = Quaternion(1.13474e-07, 0.707107, 0.707107, -5.23149e-08)
bones/10/scale = Vector3(1, 1, 1)
bones/11/position = Vector3(-0.00968189, -1.10066e-08, -0.00662707)
bones/11/scale = Vector3(1.01111, 1, 1)
bones/11/position = Vector3(-0.0110016, -3.04479e-08, -0.00873453)
bones/11/scale = Vector3(1.2664, 1, 0.772095)
bones/12/position = Vector3(-0.00823868, 6.83734e-08, -0.0102097)
bones/13/position = Vector3(-0.0200816, 4.99951e-08, 0.00489414)
bones/13/scale = Vector3(1.01111, 1, 0.981871)
bones/14/position = Vector3(-0.0333505, -4.48834e-08, -0.00314677)
bones/14/scale = Vector3(1.01111, 1, 0.981871)
bones/13/position = Vector3(-0.023624, -1.3441e-09, -0.000726155)
bones/13/scale = Vector3(1.2664, 1, 0.772095)
bones/14/position = Vector3(-0.0398201, 2.06584e-08, -0.00621833)
bones/14/scale = Vector3(1.2664, 1, 0.772096)
bones/15/position = Vector3(-0.0186913, 1.4579e-07, -0.0116523)
bones/16/position = Vector3(0.013901, 8.25914e-08, 0.0150569)
bones/16/scale = Vector3(1.01112, 1, 0.981871)
bones/17/position = Vector3(0.0275303, 9.00419e-08, 0.0069467)
bones/17/scale = Vector3(1.01111, 1, 1)
bones/16/position = Vector3(0.0184269, 1.72027e-07, 0.00634607)
bones/16/scale = Vector3(1.2664, 1, 0.772096)
bones/17/position = Vector3(0.0354973, 7.84004e-08, 0.000267413)
bones/17/scale = Vector3(1.2664, 1, 0.772096)
bones/18/position = Vector3(0.0138112, -1.99382e-07, -0.0106829)
bones/19/position = Vector3(-0.029965, -6.74833e-08, -0.0114938)
bones/20/position = Vector3(0.0319374, 2.70462e-10, -0.00811319)
bones/21/position = Vector3(0.0451344, 0.0764403, 0.0935013)
bones/21/position = Vector3(0.0451364, 0.0764193, 0.0935001)
bones/21/rotation = Quaternion(0.160115, 0.667183, 0.68874, -0.234237)
bones/21/scale = Vector3(1, 1, 1)
bones/22/position = Vector3(-0.00351833, -2.67936e-08, 0.0010112)
bones/25/position = Vector3(-0.0442944, 0.0756561, 0.0940351)
bones/25/position = Vector3(-0.0442962, 0.0756351, 0.094034)
bones/25/rotation = Quaternion(-0.161417, 0.667625, 0.688436, 0.232975)
bones/25/scale = Vector3(1, 1, 1)
bones/26/position = Vector3(0.00351835, 2.9417e-08, 0.00101115)
bones/29/rotation = Quaternion(0.0380043, -0.555038, 0.829661, 0.0463671)
bones/29/rotation = Quaternion(0.0358131, -0.592919, 0.803027, 0.0480797)
bones/29/scale = Vector3(1, 1, 1)
bones/30/rotation = Quaternion(-0.103381, -0.00165097, -0.0120306, 0.994568)
bones/30/rotation = Quaternion(-0.05837, -0.00548176, -0.0421818, 0.997388)
bones/31/rotation = Quaternion(0.00282337, 0.992799, -0.117349, -0.0238866)
bones/32/rotation = Quaternion(0.58444, -8.49062e-08, -1.2869e-06, 0.811437)
bones/32/rotation = Quaternion(0.559291, -4.29134e-08, -1.29076e-06, 0.828972)
bones/33/rotation = Quaternion(-0.0342351, -3.5846e-07, 8.54711e-08, 0.999414)
bones/35/rotation = Quaternion(0.332355, -0.0514343, 0.231042, 0.91297)
bones/36/rotation = Quaternion(-0.69474, 2.8947e-07, 5.0234e-07, 0.719261)
bones/37/rotation = Quaternion(-0.00493213, -0.0825, 0.0654597, 0.994427)
bones/35/rotation = Quaternion(0.303073, -0.108151, 0.308508, 0.895138)
bones/36/rotation = Quaternion(-0.649846, 3.16898e-07, 4.62288e-07, 0.760066)
bones/37/rotation = Quaternion(-0.0486405, -0.104208, 0.204466, 0.972095)
bones/37/scale = Vector3(1, 1, 1)
bones/38/rotation = Quaternion(-0.609424, 2.94533e-07, 9.89875e-07, 0.792845)
bones/38/rotation = Quaternion(-0.645978, 2.48e-07, 1.00563e-06, 0.763356)
bones/38/scale = Vector3(1, 1, 1)
bones/39/rotation = Quaternion(0.197471, 0.678974, 0.678974, -0.19747)
bones/39/scale = Vector3(1.00876, 1, 0.990188)
bones/41/position = Vector3(0.0139192, 0.000225329, -0.00384292)
bones/41/rotation = Quaternion(-9.69781e-10, -0.00708393, -1.34122e-07, 0.999975)
bones/39/scale = Vector3(1.11231, 1, 0.867862)
bones/41/position = Vector3(0.0170023, 0.00022532, -0.00384271)
bones/41/rotation = Quaternion(-2.2793e-08, 0.00598484, -1.22011e-07, 0.999982)
bones/41/scale = Vector3(0.999981, 1, 0.538573)
bones/42/position = Vector3(0.0392888, -1.17533e-06, -0.00209796)
bones/43/position = Vector3(-0.0495715, -2.58908e-06, 0.0301691)
@ -222,9 +222,9 @@ bones/45/position = Vector3(-0.013421, 6.33299e-08, -0.0283991)
bones/46/position = Vector3(-0.0513805, 8.90344e-07, -0.0104124)
bones/47/position = Vector3(0.0446487, -1.27684e-06, -0.0177286)
bones/48/rotation = Quaternion(-0.19747, 0.678974, 0.678974, 0.19747)
bones/48/scale = Vector3(1.00876, 1, 0.98434)
bones/50/position = Vector3(-0.0170028, 0.000225411, -0.00485537)
bones/50/rotation = Quaternion(-6.48622e-09, -0.00862222, 1.11814e-08, 0.999963)
bones/48/scale = Vector3(1.11231, 1, 0.867862)
bones/50/position = Vector3(-0.0139197, 0.000225418, -0.00485518)
bones/50/rotation = Quaternion(-3.14144e-08, 0.00728461, 7.8241e-08, 0.999973)
bones/50/scale = Vector3(0.999977, 1, 0.397035)
bones/51/position = Vector3(-0.0392888, -1.22121e-06, -0.00333335)
bones/52/position = Vector3(0.0495715, -2.68185e-06, 0.0147188)
@ -232,17 +232,17 @@ bones/53/position = Vector3(0.00910765, -7.47593e-08, 0.000409614)
bones/54/position = Vector3(0.0134209, 4.70912e-08, -0.0184937)
bones/55/position = Vector3(0.0513805, 9.29226e-07, -0.0104125)
bones/56/position = Vector3(-0.0446488, -1.30966e-06, -0.0177287)
bones/57/rotation = Quaternion(0.237212, -0.0113238, -0.689716, 0.684028)
bones/57/rotation = Quaternion(0.273654, -0.0435965, -0.711669, 0.645554)
bones/57/scale = Vector3(1, 1, 1)
bones/58/rotation = Quaternion(0.525254, 0.0605217, -0.394182, 0.751709)
bones/58/rotation = Quaternion(0.658261, 0.173487, -0.20396, 0.703559)
bones/58/scale = Vector3(1, 1, 1)
bones/59/position = Vector3(-6.61338e-09, 0.284252, -2.49928e-08)
bones/59/rotation = Quaternion(0.471746, -0.00508541, -0.0321558, 0.881133)
bones/59/position = Vector3(5.40815e-09, 0.307144, -9.06498e-09)
bones/59/rotation = Quaternion(0.395933, -0.398605, -0.162316, 0.811175)
bones/59/scale = Vector3(1, 1, 1)
bones/60/rotation = Quaternion(0.0010627, -0.238135, 0.000260604, 0.971231)
bones/60/rotation = Quaternion(0.00108256, -0.144928, 0.000158582, 0.989442)
bones/60/scale = Vector3(1, 1, 1)
bones/61/position = Vector3(-1.00192e-07, 0.0610411, -0.000133667)
bones/61/rotation = Quaternion(-0.271001, -0.314217, 0.0975737, 0.904603)
bones/61/position = Vector3(-2.59791e-08, 0.046591, -0.000102098)
bones/61/rotation = Quaternion(-0.276157, -0.198124, 0.116921, 0.933174)
bones/61/scale = Vector3(1, 1, 1)
bones/62/rotation = Quaternion(0.493569, 0.84346, 0.0982726, -0.187901)
bones/63/rotation = Quaternion(0.52804, -0.147693, -0.0941254, 0.830964)
@ -295,29 +295,29 @@ bones/93/rotation = Quaternion(-0.494209, 0.0204614, -0.0359497, 0.868359)
bones/93/scale = Vector3(1, 1.13164, 1)
bones/94/rotation = Quaternion(-0.547852, 0.057849, -0.0581314, 0.832546)
bones/94/scale = Vector3(1, 1.05697, 1)
bones/95/position = Vector3(-4.53333e-08, 0.0610411, -0.00013364)
bones/95/rotation = Quaternion(-0.789658, -0.148951, -0.0789867, 0.589927)
bones/95/position = Vector3(-1.22626e-08, 0.0465911, -0.000102191)
bones/95/rotation = Quaternion(-0.795959, -0.113211, -0.0295759, 0.593934)
bones/95/scale = Vector3(1, 1, 1)
bones/96/position = Vector3(-5.02776e-08, 0.284252, -2.52983e-08)
bones/96/rotation = Quaternion(-0.51327, 0.00987127, -0.013593, 0.858063)
bones/96/scale = Vector3(1, 1.0999, 1)
bones/96/position = Vector3(-4.57976e-08, 0.307144, 5.04497e-09)
bones/96/rotation = Quaternion(-0.52525, -0.08765, -0.208418, 0.820361)
bones/96/scale = Vector3(1, 1.15055, 1)
bones/97/position = Vector3(-0.00645471, 0.000163305, -0.00321278)
bones/97/rotation = Quaternion(0.248427, 0.0258538, -0.267814, 0.930533)
bones/98/position = Vector3(-5.76256e-09, 0.0159596, 0.000181361)
bones/98/rotation = Quaternion(-0.0586372, -0.00568235, -0.12181, 0.990804)
bones/99/rotation = Quaternion(-0.463839, 0.144545, -0.117056, 0.866174)
bones/99/rotation = Quaternion(-0.399689, 0.116779, -0.0017598, 0.90918)
bones/99/scale = Vector3(1, 1, 1)
bones/100/rotation = Quaternion(0.048629, -0.0279846, 0.476636, 0.877309)
bones/100/rotation = Quaternion(0.0474244, -0.0299806, 0.512671, 0.85675)
bones/100/scale = Vector3(1, 1, 1)
bones/101/rotation = Quaternion(0.0734811, 0.448985, 0.737726, 0.498773)
bones/101/rotation = Quaternion(0.00919888, 0.49081, 0.646158, 0.584381)
bones/101/scale = Vector3(1, 1, 1)
bones/102/position = Vector3(6.2732e-09, 0.281682, 9.00968e-08)
bones/102/rotation = Quaternion(0.0704565, 5.0887e-05, 4.90129e-05, 0.997515)
bones/102/rotation = Quaternion(0.0266923, 4.91408e-05, 5.12579e-05, 0.999644)
bones/102/scale = Vector3(1, 1, 1)
bones/103/rotation = Quaternion(0.00109412, 0.000158973, -1.86224e-07, 0.999999)
bones/103/rotation = Quaternion(0.00109832, 0.00601476, -2.36188e-05, 0.999981)
bones/103/scale = Vector3(0.999997, 0.999997, 1)
bones/104/position = Vector3(-1.97803e-07, 0.068466, -0.000150014)
bones/104/rotation = Quaternion(-0.402975, 0.000252906, -0.000177651, 0.915211)
bones/104/rotation = Quaternion(-0.440103, 0.0120994, -0.0111051, 0.897797)
bones/104/scale = Vector3(1, 1, 1)
bones/105/rotation = Quaternion(-0.272954, 0.938438, 0.146391, -0.152973)
bones/105/scale = Vector3(1, 1, 1)
@ -372,104 +372,104 @@ bones/136/scale = Vector3(1, 1.25698, 1)
bones/137/rotation = Quaternion(-0.479239, -0.0566498, 0.0570499, 0.873994)
bones/137/scale = Vector3(1, 1.15486, 1)
bones/138/position = Vector3(-1.96072e-07, 0.068466, -0.000149977)
bones/138/rotation = Quaternion(-0.838891, 0.000155662, 2.80235e-05, 0.544299)
bones/138/rotation = Quaternion(-0.849839, 0.00842519, 0.000387153, 0.526974)
bones/138/scale = Vector3(1, 1, 1)
bones/139/position = Vector3(3.48513e-09, 0.281682, 1.40144e-07)
bones/139/rotation = Quaternion(-0.681293, 2.54362e-06, 6.08382e-05, 0.732011)
bones/139/rotation = Quaternion(-0.697167, 1.14246e-06, 6.09538e-05, 0.716909)
bones/139/scale = Vector3(1, 1, 1)
bones/140/position = Vector3(-0.00091601, -0.00419344, -0.00166352)
bones/140/rotation = Quaternion(0.180101, -0.00275761, 0.0409847, 0.98279)
bones/140/scale = Vector3(1.12362, 1, 1)
bones/141/position = Vector3(2.32831e-10, 0.0159594, 0.000181319)
bones/141/rotation = Quaternion(-0.0876969, -0.00686066, -0.0793036, 0.992962)
bones/142/rotation = Quaternion(-0.585329, -0.0876637, 0.478374, 0.64874)
bones/142/rotation = Quaternion(-0.627963, -0.0317508, 0.444244, 0.638202)
bones/142/scale = Vector3(1, 1, 0.999999)
bones/143/position = Vector3(-0.0173814, 0.110106, 0.0701453)
bones/143/position = Vector3(-0.00977684, 0.110009, 0.0700904)
bones/143/rotation = Quaternion(0.0323581, -3.23524e-09, 4.47963e-09, 0.999476)
bones/144/position = Vector3(-0.0265296, 0.0535348, 0.0986293)
bones/144/position = Vector3(0.0101174, 0.0525767, 0.104673)
bones/144/rotation = Quaternion(0.0323581, -3.23524e-09, 4.47954e-09, 0.999476)
bones/145/position = Vector3(-0.0391121, -0.0119057, 0.102325)
bones/145/position = Vector3(0.00678728, -0.0164962, 0.105971)
bones/145/rotation = Quaternion(0.0323581, -3.23524e-09, 4.47955e-09, 0.999476)
bones/146/position = Vector3(0.0186246, 0.0472748, -0.128899)
bones/146/position = Vector3(-0.00780965, 0.0439172, -0.136987)
bones/146/rotation = Quaternion(0.0323581, -3.23524e-09, 4.47962e-09, 0.999476)
bones/147/position = Vector3(0.115891, 0.03646, -0.0602258)
bones/147/rotation = Quaternion(0.127656, -0.185898, 0.0402595, 0.973409)
bones/148/position = Vector3(0.112226, 0.0931296, -0.0429397)
bones/148/rotation = Quaternion(0.127656, -0.185898, 0.0402595, 0.973409)
bones/149/position = Vector3(0.0798201, 0.0755671, 0.0538211)
bones/149/rotation = Quaternion(0.127656, -0.185898, 0.0402595, 0.973409)
bones/150/position = Vector3(0.0933986, -0.00286369, 0.0477363)
bones/150/rotation = Quaternion(0.127656, -0.185898, 0.0402595, 0.973409)
bones/151/position = Vector3(0.0286762, 0.0586411, 0.0838112)
bones/147/position = Vector3(0.119088, 0.0274, -0.0567642)
bones/147/rotation = Quaternion(0.128323, -0.233519, -0.00414657, 0.963839)
bones/148/position = Vector3(0.108078, 0.0874024, -0.0470377)
bones/148/rotation = Quaternion(0.128323, -0.233519, -0.00414657, 0.963839)
bones/149/position = Vector3(0.08159, 0.0713088, 0.0240798)
bones/149/rotation = Quaternion(0.128323, -0.233519, -0.00414657, 0.963839)
bones/150/position = Vector3(0.102804, -0.00488756, 0.0119127)
bones/150/rotation = Quaternion(0.128323, -0.233519, -0.00414657, 0.963839)
bones/151/position = Vector3(0.0505875, 0.0595045, 0.0702025)
bones/151/rotation = Quaternion(0.0323581, -3.08697e-09, -9.99408e-11, 0.999476)
bones/152/position = Vector3(0.0280882, -0.0122334, 0.0854013)
bones/152/position = Vector3(0.0655902, -0.0127084, 0.0607059)
bones/152/rotation = Quaternion(0.0323581, -3.08697e-09, -9.99408e-11, 0.999476)
bones/153/position = Vector3(0.0345784, 0.11321, 0.0539122)
bones/153/rotation = Quaternion(0.127656, -0.185898, 0.0402595, 0.973409)
bones/154/position = Vector3(0.0636824, 0.137113, 0.0385026)
bones/154/rotation = Quaternion(0.127656, -0.185898, 0.0402595, 0.973409)
bones/155/position = Vector3(0.0755547, 0.161337, 0.00729911)
bones/155/rotation = Quaternion(0.127656, -0.185898, 0.0402595, 0.973409)
bones/156/position = Vector3(0.0832677, 0.163891, -0.0193784)
bones/156/rotation = Quaternion(0.127656, -0.185898, 0.0402595, 0.973409)
bones/157/position = Vector3(0.104997, 0.128412, -0.0445725)
bones/157/rotation = Quaternion(0.127656, -0.185898, 0.0402595, 0.973409)
bones/158/position = Vector3(0.0671709, 0.131556, -0.0647725)
bones/158/rotation = Quaternion(0.127656, -0.185898, 0.0402595, 0.973409)
bones/159/position = Vector3(-0.107395, 0.0602479, -0.0965316)
bones/159/rotation = Quaternion(0.0314373, 0.0264573, -0.330534, 0.942899)
bones/160/position = Vector3(-0.081367, 0.109733, -0.0856954)
bones/160/rotation = Quaternion(0.0314373, 0.0264573, -0.330534, 0.942899)
bones/161/position = Vector3(-0.105576, 0.133891, 0.0151697)
bones/161/rotation = Quaternion(0.0314373, 0.0264573, -0.330534, 0.942899)
bones/162/position = Vector3(-0.129818, 0.0691563, -0.0152148)
bones/162/rotation = Quaternion(0.0314373, 0.0264573, -0.330534, 0.942899)
bones/163/position = Vector3(-0.0727479, 0.0775946, 0.0793076)
bones/153/position = Vector3(0.0363261, 0.110584, 0.0532361)
bones/153/rotation = Quaternion(0.128323, -0.233519, -0.00414657, 0.963839)
bones/154/position = Vector3(0.0575689, 0.131111, 0.0422142)
bones/154/rotation = Quaternion(0.128323, -0.233519, -0.00414657, 0.963839)
bones/155/position = Vector3(0.0743553, 0.154664, 0.0128061)
bones/155/rotation = Quaternion(0.128323, -0.233519, -0.00414657, 0.963839)
bones/156/position = Vector3(0.0845406, 0.156977, -0.0130514)
bones/156/rotation = Quaternion(0.128323, -0.233519, -0.00414657, 0.963839)
bones/157/position = Vector3(0.101361, 0.12102, -0.0430962)
bones/157/rotation = Quaternion(0.128323, -0.233519, -0.00414657, 0.963839)
bones/158/position = Vector3(0.0563635, 0.128918, -0.0695375)
bones/158/rotation = Quaternion(0.128323, -0.233519, -0.00414657, 0.963839)
bones/159/position = Vector3(-0.111627, 0.0615783, -0.0653986)
bones/159/rotation = Quaternion(0.0317483, 0.0233073, -0.291181, 0.955857)
bones/160/position = Vector3(-0.102933, 0.113319, -0.0592115)
bones/160/rotation = Quaternion(0.0317483, 0.0233073, -0.291181, 0.955857)
bones/161/position = Vector3(-0.106708, 0.122461, 0.0361705)
bones/161/rotation = Quaternion(0.0317483, 0.0233073, -0.291181, 0.955857)
bones/162/position = Vector3(-0.129211, 0.0573469, 0.0261901)
bones/162/rotation = Quaternion(0.0317483, 0.0233073, -0.291181, 0.955857)
bones/163/position = Vector3(-0.0525523, 0.0764716, 0.0970148)
bones/163/rotation = Quaternion(0.0323581, -2.41381e-07, -7.81472e-09, 0.999476)
bones/164/position = Vector3(-0.0956698, 0.0131234, 0.0821474)
bones/164/position = Vector3(-0.0807715, 0.00876589, 0.0907723)
bones/164/rotation = Quaternion(0.0323581, -2.41381e-07, -7.81472e-09, 0.999476)
bones/165/position = Vector3(-0.0556625, 0.149288, 0.0528704)
bones/165/rotation = Quaternion(0.0314373, 0.0264573, -0.330534, 0.942899)
bones/166/position = Vector3(-0.062244, 0.184127, 0.0201765)
bones/166/rotation = Quaternion(0.0314373, 0.0264573, -0.330534, 0.942899)
bones/167/position = Vector3(-0.0545475, 0.198521, -0.0178273)
bones/167/rotation = Quaternion(0.0314373, 0.0264573, -0.330534, 0.942899)
bones/168/position = Vector3(-0.056203, 0.195251, -0.0454726)
bones/168/rotation = Quaternion(0.0314373, 0.0264573, -0.330534, 0.942899)
bones/169/position = Vector3(-0.0888787, 0.166864, -0.0635684)
bones/169/rotation = Quaternion(0.0314373, 0.0264573, -0.330534, 0.942899)
bones/170/position = Vector3(-0.0563384, 0.148642, -0.0744274)
bones/170/rotation = Quaternion(0.0314373, 0.0264573, -0.330534, 0.942899)
bones/171/rotation = Quaternion(0.723243, 0.224035, -0.438572, 0.484131)
bones/165/position = Vector3(-0.0495015, 0.142372, 0.0563151)
bones/165/rotation = Quaternion(0.0317483, 0.0233073, -0.291181, 0.955857)
bones/166/position = Vector3(-0.0661212, 0.180157, 0.0201212)
bones/166/rotation = Quaternion(0.0317483, 0.0233073, -0.291181, 0.955857)
bones/167/position = Vector3(-0.0596306, 0.195154, -0.0182209)
bones/167/rotation = Quaternion(0.0317483, 0.0233073, -0.291181, 0.955857)
bones/168/position = Vector3(-0.0607534, 0.191763, -0.0458784)
bones/168/rotation = Quaternion(0.0317483, 0.0233073, -0.291181, 0.955857)
bones/169/position = Vector3(-0.0908062, 0.160779, -0.0642596)
bones/169/rotation = Quaternion(0.0317483, 0.0233073, -0.291181, 0.955857)
bones/170/position = Vector3(-0.0567139, 0.145932, -0.074734)
bones/170/rotation = Quaternion(0.0317483, 0.0233073, -0.291181, 0.955857)
bones/171/rotation = Quaternion(0.854971, 0.00733622, -0.260115, 0.448677)
bones/171/scale = Vector3(0.999998, 0.999997, 1.00001)
bones/172/position = Vector3(3.62338e-10, 0.531431, 3.56619e-08)
bones/172/rotation = Quaternion(0.244495, -2.62556e-06, -6.46687e-07, 0.969651)
bones/172/rotation = Quaternion(0.258803, -2.06746e-06, -4.1853e-07, 0.96593)
bones/172/scale = Vector3(1, 0.999998, 1.00001)
bones/173/position = Vector3(6.48577e-09, 0.418112, 8.79831e-08)
bones/173/rotation = Quaternion(-0.3589, -0.022841, 0.05326, 0.931575)
bones/173/rotation = Quaternion(-0.376693, -0.00422509, 0.0103832, 0.926271)
bones/173/scale = Vector3(1, 0.999992, 0.999996)
bones/174/rotation = Quaternion(-0.388439, -1.7287e-07, -1.04265e-07, 0.921475)
bones/175/position = Vector3(1.16517e-08, 0.418112, 8.45817e-08)
bones/175/rotation = Quaternion(-0.730972, -0.01463, 0.0140935, 0.682105)
bones/175/rotation = Quaternion(-0.735503, -0.00277704, 0.00277694, 0.67751)
bones/175/scale = Vector3(1, 1, 1)
bones/176/position = Vector3(1.15382e-08, 0.531431, 3.0748e-08)
bones/176/rotation = Quaternion(-0.652046, -6.86224e-07, -1.3499e-06, 0.75818)
bones/176/scale = Vector3(1, 1.00877, 1)
bones/177/rotation = Quaternion(0.93234, 0.0696643, -0.119259, 0.334165)
bones/176/rotation = Quaternion(-0.646424, -5.9335e-07, -1.08843e-06, 0.762979)
bones/176/scale = Vector3(1, 1.01069, 1)
bones/177/rotation = Quaternion(0.942402, -0.134367, 0.108775, 0.286342)
bones/177/scale = Vector3(1, 0.999998, 1.00001)
bones/178/position = Vector3(2.73163e-08, 0.531431, 1.20327e-09)
bones/178/rotation = Quaternion(0.253182, -7.25786e-08, -3.2547e-07, 0.967419)
bones/178/rotation = Quaternion(0.329132, 1.76459e-06, 3.5229e-07, 0.944284)
bones/178/scale = Vector3(1, 0.999999, 1.00001)
bones/179/position = Vector3(8.4155e-09, 0.418112, 3.97981e-07)
bones/179/rotation = Quaternion(-0.330274, 0.000842571, -0.0976655, 0.938818)
bones/179/rotation = Quaternion(-0.431379, -0.000697695, -0.137163, 0.891683)
bones/179/scale = Vector3(1, 0.99999, 0.999998)
bones/180/rotation = Quaternion(-0.601874, 1.4417e-07, 1.54647e-07, 0.798591)
bones/180/rotation = Quaternion(-0.556989, 1.6083e-07, 1.64943e-07, 0.83052)
bones/181/position = Vector3(2.69973e-08, 0.418112, 4.26027e-07)
bones/181/rotation = Quaternion(-0.723679, 0.0135942, -0.0314861, 0.689284)
bones/181/rotation = Quaternion(-0.749706, 0.0184746, -0.0444561, 0.660017)
bones/181/scale = Vector3(1, 1, 1)
bones/182/position = Vector3(1.89344e-08, 0.531431, -1.32203e-08)
bones/182/rotation = Quaternion(-0.648639, 1.38857e-07, 8.32144e-08, 0.761096)
bones/182/scale = Vector3(1, 1.00991, 1)
bones/182/rotation = Quaternion(-0.617914, 5.15812e-07, 1.002e-06, 0.786246)
bones/182/scale = Vector3(1, 1.02443, 1)
[node name="BoneFlipper" type="SkeletonModifier3D" parent="Model/Armature/Skeleton3D" index="0"]
_import_path = NodePath("")
@ -539,11 +539,11 @@ libraries = {
script = ExtResource("7_wqfne")
metadata/_custom_type_script = "uid://clks186ll0joi"
[node name="PlayerMovementHandler" type="Node" parent="."]
[node name="PlayerMover" type="Node" parent="."]
script = ExtResource("8_wnwbv")
metadata/_custom_type_script = "uid://5vgfsrafb8ud"
[node name="PlayerAimingHandler" type="Node" parent="."]
[node name="PlayerAimer" type="Node" parent="."]
script = ExtResource("9_gl8cc")
metadata/_custom_type_script = "uid://c131c3hcbmu77"

View File

@ -112,6 +112,20 @@ light_energy = 0.75
[node name="MainCamera" parent="." instance=ExtResource("3_74lek")]
transform = Transform3D(0.866025, -0.321394, 0.383022, 0, 0.766044, 0.642788, -0.5, -0.55667, 0.663414, 4.894, 6.43, 6.963)
_height_offset = null
_distance = null
_fov = null
_angle_degrees = null
_aim_offset_factor_mouse = null
_aim_offset_factor_controller = null
_aim_damping = null
_damage_shake_duration = null
_damage_shake_ease = null
_damage_shake_amplitude = null
_damage_shake_frequency = null
_hit_shake_fov = null
_hit_shake_duration = null
_hit_shake_ease = null
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_wctar")

View File

@ -80,12 +80,12 @@ func _follow(player: Player, delta: float) -> Vector3:
if not Player.is_single_player():
player_offset.aim_offset = Vector3.ZERO
elif player.input_mode_is(Inputer.Mode.KB_MOUSE):
player_offset.aim_offset = player.aiming.aim_offset
player_offset.aim_offset = player.aimer.aim_offset
elif player.input_mode_is(Inputer.Mode.CONTROLLER):
var new_aim_offset := (
Vector3.ZERO
if player.aiming.aim_input.length() == 0
else player.aiming.aim_offset
if player.aimer.aim_input.length() == 0
else player.aimer.aim_offset
)
player_offset.aim_offset = player_offset.aim_offset.lerp(
new_aim_offset, _aim_damping * delta

View File

@ -13,8 +13,8 @@ static var instances: Array[Player]
@export_group("References")
@export var attack: PlayerAttacker
@export var stats: PlayerStats
@export var movement: PlayerMovementHandler
@export var aiming: PlayerAimingHandler
@export var mover: PlayerMover
@export var aimer: PlayerAimer
@export var _cursor: PlayerCursor
@ -31,7 +31,7 @@ func _ready() -> void:
func _process(_delta: float) -> void:
var aim_pos := global_position + aiming.aim_offset
var aim_pos := global_position + aimer.aim_offset
Debugger.marker("aim", aim_pos + Vector3.UP)
Debugger.vector("aimv", Vector3(aim_pos.x, 0, aim_pos.z), aim_pos + Vector3.UP)
@ -39,12 +39,12 @@ func _process(_delta: float) -> void:
func _physics_process(delta: float) -> void:
_aiming()
var can_move := not attack.is_hitting()
velocity = movement.movement(velocity, delta, is_on_floor(), can_move)
velocity = mover.process_movement(velocity, delta, is_on_floor(), can_move)
move_and_slide()
if not attack.is_hitting() and aiming.aim_offset.length() > 0:
look_at(global_position + aiming.aim_offset, Vector3.UP, true)
if not attack.is_hitting() and aimer.aim_offset.length() > 0:
look_at(global_position + aimer.aim_offset, Vector3.UP, true)
_process_respawning()
_cursor.handle_cursor(self, delta)
@ -62,8 +62,8 @@ func _unhandled_input(event: InputEvent) -> void:
):
return
aiming.handle_input(event, mode)
movement.handle_input(event, mode)
aimer.handle_input(event, mode)
mover.handle_input(event, mode)
if event.is_action_pressed("attack"):
attack.attack()
@ -78,12 +78,12 @@ func input_mode_is(mode: Inputer.Mode) -> bool:
func _aiming() -> void:
if input_mode_is(Inputer.Mode.CONTROLLER):
aiming.controller_aiming(movement.move_input)
aimer.aim_controller(mover.move_input)
if input_mode_is(Inputer.Mode.KB_MOUSE):
var mouse_pos := get_viewport().get_mouse_position()
if get_viewport().get_visible_rect().has_point(mouse_pos):
aiming.mouse_aiming(mouse_pos, global_position, is_on_floor())
aimer.aim_mouse(mouse_pos, global_position, is_on_floor())
func _process_respawning() -> void:

View File

@ -1,4 +1,4 @@
class_name PlayerAimingHandler
class_name PlayerAimer
extends Node
@export var _controller_aim_offset: float = 6
@ -31,7 +31,7 @@ func handle_input(event: InputEvent, mode: Inputer.Mode) -> void:
_aim_down = motion_event.get_action_strength("aim_down")
func controller_aiming(move_input: Vector2) -> void:
func aim_controller(move_input: Vector2) -> void:
if Player.is_single_player():
aim_input = Input.get_vector(
"aim_left",
@ -58,7 +58,7 @@ func controller_aiming(move_input: Vector2) -> void:
)
func mouse_aiming(
func aim_mouse(
mouse_pos: Vector2, player_position: Vector3, is_on_floor: bool
) -> void:
var position_y := player_position.y

View File

@ -37,16 +37,16 @@ func _process(_delta: float) -> void:
_bone_flipper.flip = _is_left()
var has_input_prev := _has_input
_speed = _player.velocity.length() / _player.movement.move_speed
_speed = _player.velocity.length() / _player.mover.move_speed
_has_input = (
_player.movement.move_input.length() > 0 and not _player.attack.is_hitting()
_player.mover.move_input.length() > 0 and not _player.attack.is_hitting()
)
var velocity_relative := _player.to_local(
_player.global_position + _player.velocity
)
var velocity_blend := (
Vector2(-velocity_relative.x, velocity_relative.z) / _player.movement.move_speed
Vector2(-velocity_relative.x, velocity_relative.z) / _player.mover.move_speed
)
if _is_left():

View File

@ -13,7 +13,7 @@ var _side: float = 0
func handle_cursor(player: Player, delta: float) -> void:
var cursor_pos_world := player.attack.global_position + player.aiming.aim_offset
var cursor_pos_world := player.attack.global_position + player.aimer.aim_offset
var cursor_pos_screen := MainCamera.instance.unproject_position(cursor_pos_world)
var clamp_corner_min := Vector2.ZERO
@ -32,7 +32,7 @@ func handle_cursor(player: Player, delta: float) -> void:
_side_change_speed * delta
)
var aim_offset_normalized := player.aiming.aim_offset.normalized()
var aim_offset_normalized := player.aimer.aim_offset.normalized()
var bat_rotation_point_screen := MainCamera.instance.unproject_position(
cursor_pos_world + aim_offset_normalized.rotated(Vector3.UP, _side as float)
)

View File

@ -1,4 +1,4 @@
class_name PlayerMovementHandler
class_name PlayerMover
extends Node
@export var move_speed: float = 8
@ -54,7 +54,7 @@ func handle_input(event: InputEvent, mode: Inputer.Mode) -> void:
_move_down = motion_event.get_action_strength("move_down")
func movement(
func process_movement(
velocity: Vector3, delta: float, is_on_floor: bool, can_move: bool
) -> Vector3:
velocity = _lateral_movement(velocity, delta, can_move)