diff --git a/project.godot b/project.godot index 700ed854..94a698b4 100644 --- a/project.godot +++ b/project.godot @@ -137,6 +137,18 @@ Throw={ "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":88,"key_label":0,"unicode":120,"location":0,"echo":false,"script":null) ] } +StrafeLeft={ +"deadzone": 0.5, +"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":4,"axis_value":1.0,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":113,"location":0,"echo":false,"script":null) +] +} +StrafeRight={ +"deadzone": 0.5, +"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":5,"axis_value":1.0,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":82,"key_label":0,"unicode":114,"location":0,"echo":false,"script":null) +] +} [internationalization] diff --git a/src/map/Overworld.tscn b/src/map/Overworld.tscn index e2bfef6b..104e6d9a 100644 --- a/src/map/Overworld.tscn +++ b/src/map/Overworld.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=47 format=3 uid="uid://dvnc26rebk6o0"] +[gd_scene load_steps=48 format=3 uid="uid://dvnc26rebk6o0"] [ext_resource type="Script" path="res://src/map/dungeon/floors/Overworld.cs" id="1_5hmt3"] [ext_resource type="PackedScene" uid="uid://d4l4qutp8x40c" path="res://src/npc/rat/NPC.tscn" id="3_4sm8u"] @@ -13,6 +13,9 @@ [ext_resource type="Texture2D" uid="uid://c4iqttgjb0kq3" path="res://src/map/overworld/Textures/kenney_prototype-textures/treetexture.png" id="12_i7q8i"] [ext_resource type="ArrayMesh" uid="uid://bb46flkajcbtd" path="res://src/map/overworld/Models/tree.obj" id="13_uvfqy"] +[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_0dt82"] +data = PackedVector3Array(-0.9588, 0.9579, 0.4896, -0.5, 1, 0.5, -0.8391, 0.8276, 0.8336, -0.8391, 0.8276, 0.8336, -0.5, 1, 0.5, -0.4901, 0.9579, 0.9583, -0.4901, 0.9579, 0.9583, -0.5, 0.5, 1, -0.8391, 0.8276, 0.8336, -0.8391, 0.8276, 0.8336, -0.5, 0.5, 1, -0.9588, 0.4891, 0.9583, -0.9581, 0.9586, -0.4896, -1, 0.5, -0.5, -0.83, 0.8364, -0.8336, -0.83, 0.8364, -0.8336, -1, 0.5, -0.5, -0.9581, 0.4898, -0.9584, 0.861, -0.8512, 0.4495, 0.4895, -0.98, 0.4869, 0.8251, -0.8009, 0.8162, 0.8251, -0.8009, 0.8162, 0.4895, -0.98, 0.4869, 0.462, -0.8241, 0.8419, 0.9579, 0.9588, 0.4896, 0.9888, 0.4976, 0.4903, 0.8127, 0.8359, 0.8206, 0.8127, 0.8359, 0.8206, 0.9888, 0.4976, 0.4903, 0.8241, 0.462, 0.8419, 0.4107, 0.7407, -0.7286, 0.4332, 0.4392, -0.9094, 0.7491, 0.757, -0.7054, 0.7491, 0.757, -0.7054, 0.4332, 0.4392, -0.9094, 0.8323, 0.4537, -0.8118, 0.4957, -0.0035, -0.9948, 0.5, -0.5, -1, 0.959, -0.0024, -0.9576, 0.959, -0.0024, -0.9576, 0.5, -0.5, -1, 0.9584, -0.4897, -0.9584, 1, 0, 0.5, 0.9918, -0.4911, 0.4966, 0.9576, -0.0024, 0.959, 0.9576, -0.0024, 0.959, 0.9918, -0.4911, 0.4966, 0.9588, -0.4891, 0.9583, -1, 0, -0.5, -0.9985, -0.4987, -0.5, -0.9688, 0, -0.9688, -0.9688, 0, -0.9688, -0.9985, -0.4987, -0.5, -0.9688, -0.5, -0.9688, -0.5, 0, 1, -0.5, -0.5, 1, -0.9688, 0, 0.9687, -0.9688, 0, 0.9687, -0.5, -0.5, 1, -0.9579, -0.4901, 0.9583, -1, 0, 0.5, -1, -0.5, 0.5, -1, 0, 0, -1, 0, 0, -1, -0.5, 0.5, -1, -0.5, 0, 1, 0, -0.5, 1, -0.5, -0.5, 1, 0, 0, 1, 0, 0, 1, -0.5, -0.5, 1, -0.5, 0, 0.9517, 0.9495, -0.4773, 0.9903, 0.4976, -0.4889, 0.9684, 0.9678, 0.0009, 0.9684, 0.9678, 0.0009, 0.9903, 0.4976, -0.4889, 1, 0.5, 0, 0.9584, -0.9584, -0.4897, 0.5, -1, -0.5, 0.9606, -0.9599, -0.0033, 0.9606, -0.9599, -0.0033, 0.5, -1, -0.5, 0.5, -1, 0, -0.9588, 0.9579, 0.4896, -1, 0.5, 0.5, -0.9688, 0.9687, 0, -0.9688, 0.9687, 0, -1, 0.5, 0.5, -1, 0.5, 0, -0.9581, 0.9586, -0.4896, -0.5001, 0.9981, -0.4982, -0.9688, 0.9687, 0, -0.9688, 0.9687, 0, -0.5001, 0.9981, -0.4982, -0.5, 1, 0, -0.83, 0.8364, -0.8336, -0.4899, 0.9473, -0.9483, -0.9581, 0.9586, -0.4896, -0.9581, 0.9586, -0.4896, -0.4899, 0.9473, -0.9483, -0.5001, 0.9981, -0.4982, 0.8346, -0.8342, -0.8345, 0.4897, -0.9584, -0.9584, 0.9584, -0.9584, -0.4897, 0.9584, -0.9584, -0.4897, 0.4897, -0.9584, -0.9584, 0.5, -1, -0.5, 0.7491, 0.757, -0.7054, 0.8323, 0.4537, -0.8118, 0.9517, 0.9495, -0.4773, 0.9517, 0.9495, -0.4773, 0.8323, 0.4537, -0.8118, 0.9903, 0.4976, -0.4889, 0.959, -0.0024, -0.9576, 0.9584, -0.4897, -0.9584, 1, 0, -0.5, 1, 0, -0.5, 0.9584, -0.4897, -0.9584, 1, -0.5, -0.5, -1, 0, 0, -1, -0.5, 0, -1, 0, -0.5, -1, 0, -0.5, -1, -0.5, 0, -0.9985, -0.4987, -0.5, -0.9688, 0.9687, 0, -1, 0.5, 0, -0.9581, 0.9586, -0.4896, -0.9581, 0.9586, -0.4896, -1, 0.5, 0, -1, 0.5, -0.5, -0.8391, 0.8276, 0.8336, -0.9588, 0.4891, 0.9583, -0.9588, 0.9579, 0.4896, -0.9588, 0.9579, 0.4896, -0.9588, 0.4891, 0.9583, -1, 0.5, 0.5, -0.9688, 0, 0.9687, -0.9579, -0.4901, 0.9583, -1, 0, 0.5, -1, 0, 0.5, -0.9579, -0.4901, 0.9583, -1, -0.5, 0.5, 1, 0, 0, 1, -0.5, 0, 1, 0, 0.5, 1, 0, 0.5, 1, -0.5, 0, 0.9918, -0.4911, 0.4966, 0.9684, 0.9678, 0.0009, 1, 0.5, 0, 0.9579, 0.9588, 0.4896, 0.9579, 0.9588, 0.4896, 1, 0.5, 0, 0.9888, 0.4976, 0.4903, 0.9606, -0.9599, -0.0033, 0.5, -1, 0, 0.861, -0.8512, 0.4495, 0.861, -0.8512, 0.4495, 0.5, -1, 0, 0.4895, -0.98, 0.4869, -0.9688, 0.9687, 0, -0.5, 1, 0, -0.9588, 0.9579, 0.4896, -0.9588, 0.9579, 0.4896, -0.5, 1, 0, -0.5, 1, 0.5, 1, 0.5, 0, 1, 0, 0, 0.9888, 0.4976, 0.4903, 0.9888, 0.4976, 0.4903, 1, 0, 0, 1, 0, 0.5, -0.9588, 0.4891, 0.9583, -0.9688, 0, 0.9687, -1, 0.5, 0.5, -1, 0.5, 0.5, -0.9688, 0, 0.9687, -1, 0, 0.5, -1, 0.5, 0, -1, 0, 0, -1, 0.5, -0.5, -1, 0.5, -0.5, -1, 0, 0, -1, 0, -0.5, 0.8323, 0.4537, -0.8118, 0.959, -0.0024, -0.9576, 0.9903, 0.4976, -0.4889, 0.9903, 0.4976, -0.4889, 0.959, -0.0024, -0.9576, 1, 0, -0.5, -1, 0.5, 0.5, -1, 0, 0.5, -1, 0.5, 0, -1, 0.5, 0, -1, 0, 0.5, -1, 0, 0, 0.9903, 0.4976, -0.4889, 1, 0, -0.5, 1, 0.5, 0, 1, 0.5, 0, 1, 0, -0.5, 1, 0, 0, 0.4332, 0.4392, -0.9094, 0.4957, -0.0035, -0.9948, 0.8323, 0.4537, -0.8118, 0.8323, 0.4537, -0.8118, 0.4957, -0.0035, -0.9948, 0.959, -0.0024, -0.9576, 0.9888, 0.4976, 0.4903, 1, 0, 0.5, 0.8241, 0.462, 0.8419, 0.8241, 0.462, 0.8419, 1, 0, 0.5, 0.9576, -0.0024, 0.959, -1, 0.5, -0.5, -1, 0, -0.5, -0.9581, 0.4898, -0.9584, -0.9581, 0.4898, -0.9584, -1, 0, -0.5, -0.9688, 0, -0.9688, -0.5, 0.5, 1, -0.5, 0, 1, -0.9588, 0.4891, 0.9583, -0.9588, 0.4891, 0.9583, -0.5, 0, 1, -0.9688, 0, 0.9687, 1, -0.5, 0, 0.9606, -0.9599, -0.0033, 0.9918, -0.4911, 0.4966, 0.9918, -0.4911, 0.4966, 0.9606, -0.9599, -0.0033, 0.861, -0.8512, 0.4495, -0.9579, -0.4901, 0.9583, -0.8276, -0.8391, 0.8336, -1, -0.5, 0.5, -1, -0.5, 0.5, -0.8276, -0.8391, 0.8336, -0.9579, -0.9588, 0.4896, -1, -0.5, 0, -0.9672, -0.9674, 0, -0.9985, -0.4987, -0.5, -0.9985, -0.4987, -0.5, -0.9672, -0.9674, 0, -0.9503, -0.9526, -0.5, 0.9584, -0.4897, -0.9584, 0.8346, -0.8342, -0.8345, 1, -0.5, -0.5, 1, -0.5, -0.5, 0.8346, -0.8342, -0.8345, 0.9584, -0.9584, -0.4897, 1, -0.5, -0.5, 0.9584, -0.9584, -0.4897, 1, -0.5, 0, 1, -0.5, 0, 0.9584, -0.9584, -0.4897, 0.9606, -0.9599, -0.0033, -1, -0.5, 0.5, -0.9579, -0.9588, 0.4896, -1, -0.5, 0, -1, -0.5, 0, -0.9579, -0.9588, 0.4896, -0.9672, -0.9674, 0, -0.5, -0.5, 1, -0.4891, -0.9588, 0.9583, -0.9579, -0.4901, 0.9583, -0.9579, -0.4901, 0.9583, -0.4891, -0.9588, 0.9583, -0.8276, -0.8391, 0.8336, -0.9985, -0.4987, -0.5, -0.9503, -0.9526, -0.5, -0.9688, -0.5, -0.9688, -0.9688, -0.5, -0.9688, -0.9503, -0.9526, -0.5, -0.9563, -0.9565, -0.9583, 0.9918, -0.4911, 0.4966, 0.861, -0.8512, 0.4495, 0.9588, -0.4891, 0.9583, 0.9588, -0.4891, 0.9583, 0.861, -0.8512, 0.4495, 0.8251, -0.8009, 0.8162, 0.5, -0.5, -1, 0.4897, -0.9584, -0.9584, 0.9584, -0.4897, -0.9584, 0.9584, -0.4897, -0.9584, 0.4897, -0.9584, -0.9584, 0.8346, -0.8342, -0.8345, -0.5, -0.5, -1, -0.5, -0.9688, -0.9688, 0, -0.5, -1, 0, -0.5, -1, -0.5, -0.9688, -0.9688, 0, -0.9688, -0.9688, 0.4976, -0.4889, 0.9903, 0.462, -0.8241, 0.8419, 0, -0.5, 1, 0, -0.5, 1, 0.462, -0.8241, 0.8419, -0.0024, -0.9576, 0.959, 0.4889, 0.4976, 0.9903, 0.5, 0, 1, 0, 0.5, 1, 0, 0.5, 1, 0.5, 0, 1, 0, 0, 1, -0.5, 0.5, -1, -0.5, 0, -1, -0.0049, 0.4851, -0.9847, -0.0049, 0.4851, -0.9847, -0.5, 0, -1, 0, 0, -1, -0.0004, 0.9972, 0.0028, 0.4954, 0.9849, 0.0159, 0, 1, 0.5, 0, 1, 0.5, 0.4954, 0.9849, 0.0159, 0.4997, 0.9991, 0.5009, 0, -1, 0, -0.5, -1, 0, 0, -1, 0.5, 0, -1, 0.5, -0.5, -1, 0, -0.5, -1, 0.5, 0, -0.9688, -0.9688, -0.5, -0.9688, -0.9688, 0, -1, -0.5, 0, -1, -0.5, -0.5, -0.9688, -0.9688, -0.4985, -0.9987, -0.5, -0.0128, 0.8148, -0.8288, 0.4107, 0.7407, -0.7286, -0.0031, 0.9615, -0.4631, -0.0031, 0.9615, -0.4631, 0.4107, 0.7407, -0.7286, 0.4783, 0.9272, -0.4238, -0.0031, 0.9615, -0.4631, 0.4783, 0.9272, -0.4238, -0.0004, 0.9972, 0.0028, -0.0004, 0.9972, 0.0028, 0.4783, 0.9272, -0.4238, 0.4954, 0.9849, 0.0159, 0, -1, -0.5, -0.4985, -0.9987, -0.5, 0, -1, 0, 0, -1, 0, -0.4985, -0.9987, -0.5, -0.5, -1, 0, 0.5, 0, 1, 0.4976, -0.4889, 0.9903, 0, 0, 1, 0, 0, 1, 0.4976, -0.4889, 0.9903, 0, -0.5, 1, -0.5, 0, -1, -0.5, -0.5, -1, 0, 0, -1, 0, 0, -1, -0.5, -0.5, -1, 0, -0.5, -1, -0.4899, 0.9473, -0.9483, -0.5, 0.5, -1, -0.0128, 0.8148, -0.8288, -0.0128, 0.8148, -0.8288, -0.5, 0.5, -1, -0.0049, 0.4851, -0.9847, 0, -1, 0.5, -0.5, -1, 0.5, -0.0024, -0.9576, 0.959, -0.0024, -0.9576, 0.959, -0.5, -1, 0.5, -0.4891, -0.9588, 0.9583, 0.4891, 0.9588, 0.9583, 0.4889, 0.4976, 0.9903, 0, 0.9687, 0.9687, 0, 0.9687, 0.9687, 0.4889, 0.4976, 0.9903, 0, 0.5, 1, 0, 1, 0.5, 0.4997, 0.9991, 0.5009, 0, 0.9687, 0.9687, 0, 0.9687, 0.9687, 0.4997, 0.9991, 0.5009, 0.4891, 0.9588, 0.9583, 0.4997, 0.9991, 0.5009, 0.9579, 0.9588, 0.4896, 0.4891, 0.9588, 0.9583, 0.4891, 0.9588, 0.9583, 0.9579, 0.9588, 0.4896, 0.8127, 0.8359, 0.8206, 0.8127, 0.8359, 0.8206, 0.8241, 0.462, 0.8419, 0.4891, 0.9588, 0.9583, 0.4891, 0.9588, 0.9583, 0.8241, 0.462, 0.8419, 0.4889, 0.4976, 0.9903, 0.9576, -0.0024, 0.959, 0.9588, -0.4891, 0.9583, 0.5, 0, 1, 0.5, 0, 1, 0.9588, -0.4891, 0.9583, 0.4976, -0.4889, 0.9903, 0.4783, 0.9272, -0.4238, 0.9517, 0.9495, -0.4773, 0.4954, 0.9849, 0.0159, 0.4954, 0.9849, 0.0159, 0.9517, 0.9495, -0.4773, 0.9684, 0.9678, 0.0009, 0.4107, 0.7407, -0.7286, 0.7491, 0.757, -0.7054, 0.4783, 0.9272, -0.4238, 0.4783, 0.9272, -0.4238, 0.7491, 0.757, -0.7054, 0.9517, 0.9495, -0.4773, 0.4954, 0.9849, 0.0159, 0.9684, 0.9678, 0.0009, 0.4997, 0.9991, 0.5009, 0.4997, 0.9991, 0.5009, 0.9684, 0.9678, 0.0009, 0.9579, 0.9588, 0.4896, 0.8241, 0.462, 0.8419, 0.9576, -0.0024, 0.959, 0.4889, 0.4976, 0.9903, 0.4889, 0.4976, 0.9903, 0.9576, -0.0024, 0.959, 0.5, 0, 1, 0.9588, -0.4891, 0.9583, 0.8251, -0.8009, 0.8162, 0.4976, -0.4889, 0.9903, 0.4976, -0.4889, 0.9903, 0.8251, -0.8009, 0.8162, 0.462, -0.8241, 0.8419, 0, -0.5, -1, 0, -0.9688, -0.9688, 0.5, -0.5, -1, 0.5, -0.5, -1, 0, -0.9688, -0.9688, 0.4897, -0.9584, -0.9584, -0.0049, 0.4851, -0.9847, 0, 0, -1, 0.4332, 0.4392, -0.9094, 0.4332, 0.4392, -0.9094, 0, 0, -1, 0.4957, -0.0035, -0.9948, 0.5, -1, 0, 0, -1, 0, 0.4895, -0.98, 0.4869, 0.4895, -0.98, 0.4869, 0, -1, 0, 0, -1, 0.5, 0.4897, -0.9584, -0.9584, 0, -0.9688, -0.9688, 0.5, -1, -0.5, 0.5, -1, -0.5, 0, -0.9688, -0.9688, 0, -1, -0.5, 0.5, -1, -0.5, 0, -1, -0.5, 0.5, -1, 0, 0.5, -1, 0, 0, -1, -0.5, 0, -1, 0, 0, 0, -1, 0, -0.5, -1, 0.4957, -0.0035, -0.9948, 0.4957, -0.0035, -0.9948, 0, -0.5, -1, 0.5, -0.5, -1, -0.0128, 0.8148, -0.8288, -0.0049, 0.4851, -0.9847, 0.4107, 0.7407, -0.7286, 0.4107, 0.7407, -0.7286, -0.0049, 0.4851, -0.9847, 0.4332, 0.4392, -0.9094, 0.4895, -0.98, 0.4869, 0, -1, 0.5, 0.462, -0.8241, 0.8419, 0.462, -0.8241, 0.8419, 0, -1, 0.5, -0.0024, -0.9576, 0.959, -0.5, -1, 0.5, -0.9579, -0.9588, 0.4896, -0.4891, -0.9588, 0.9583, -0.4891, -0.9588, 0.9583, -0.9579, -0.9588, 0.4896, -0.8276, -0.8391, 0.8336, -0.83, 0.8364, -0.8336, -0.9581, 0.4898, -0.9584, -0.4899, 0.9473, -0.9483, -0.4899, 0.9473, -0.9483, -0.9581, 0.4898, -0.9584, -0.5, 0.5, -1, -0.9688, 0, -0.9688, -0.9688, -0.5, -0.9688, -0.5, 0, -1, -0.5, 0, -1, -0.9688, -0.5, -0.9688, -0.5, -0.5, -1, -0.4985, -0.9987, -0.5, -0.9503, -0.9526, -0.5, -0.5, -1, 0, -0.5, -1, 0, -0.9503, -0.9526, -0.5, -0.9672, -0.9674, 0, -0.5, -0.9688, -0.9688, -0.9563, -0.9565, -0.9583, -0.4985, -0.9987, -0.5, -0.4985, -0.9987, -0.5, -0.9563, -0.9565, -0.9583, -0.9503, -0.9526, -0.5, -0.5, -1, 0, -0.9672, -0.9674, 0, -0.5, -1, 0.5, -0.5, -1, 0.5, -0.9672, -0.9674, 0, -0.9579, -0.9588, 0.4896, -0.9581, 0.4898, -0.9584, -0.9688, 0, -0.9688, -0.5, 0.5, -1, -0.5, 0.5, -1, -0.9688, 0, -0.9688, -0.5, 0, -1, -0.9688, -0.5, -0.9688, -0.9563, -0.9565, -0.9583, -0.5, -0.5, -1, -0.5, -0.5, -1, -0.9563, -0.9565, -0.9583, -0.5, -0.9688, -0.9688, 0, -0.5, 1, -0.0024, -0.9576, 0.959, -0.5, -0.5, 1, -0.5, -0.5, 1, -0.0024, -0.9576, 0.959, -0.4891, -0.9588, 0.9583, 0, 0.5, 1, 0, 0, 1, -0.5, 0.5, 1, -0.5, 0.5, 1, 0, 0, 1, -0.5, 0, 1, -0.5, 1, 0, -0.0004, 0.9972, 0.0028, -0.5, 1, 0.5, -0.5, 1, 0.5, -0.0004, 0.9972, 0.0028, 0, 1, 0.5, -0.4899, 0.9473, -0.9483, -0.0128, 0.8148, -0.8288, -0.5001, 0.9981, -0.4982, -0.5001, 0.9981, -0.4982, -0.0128, 0.8148, -0.8288, -0.0031, 0.9615, -0.4631, -0.5001, 0.9981, -0.4982, -0.0031, 0.9615, -0.4631, -0.5, 1, 0, -0.5, 1, 0, -0.0031, 0.9615, -0.4631, -0.0004, 0.9972, 0.0028, 0, 0, 1, 0, -0.5, 1, -0.5, 0, 1, -0.5, 0, 1, 0, -0.5, 1, -0.5, -0.5, 1, 0, 0.9687, 0.9687, 0, 0.5, 1, -0.4901, 0.9579, 0.9583, -0.4901, 0.9579, 0.9583, 0, 0.5, 1, -0.5, 0.5, 1, -0.5, 1, 0.5, 0, 1, 0.5, -0.4901, 0.9579, 0.9583, -0.4901, 0.9579, 0.9583, 0, 1, 0.5, 0, 0.9687, 0.9687) + [sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_fi5wi"] data = PackedVector3Array(-0.9588, 0.9579, 0.4896, -0.5, 1, 0.5, -0.8391, 0.8276, 0.8336, -0.8391, 0.8276, 0.8336, -0.5, 1, 0.5, -0.4901, 0.9579, 0.9583, -0.4901, 0.9579, 0.9583, -0.5, 0.5, 1, -0.8391, 0.8276, 0.8336, -0.8391, 0.8276, 0.8336, -0.5, 0.5, 1, -0.9588, 0.4891, 0.9583, -0.9581, 0.9586, -0.4896, -1, 0.5, -0.5, -0.83, 0.8364, -0.8336, -0.83, 0.8364, -0.8336, -1, 0.5, -0.5, -0.9581, 0.4898, -0.9584, 0.861, -0.8512, 0.4495, 0.4895, -0.98, 0.4869, 0.8251, -0.8009, 0.8162, 0.8251, -0.8009, 0.8162, 0.4895, -0.98, 0.4869, 0.462, -0.8241, 0.8419, 0.9579, 0.9588, 0.4896, 0.9888, 0.4976, 0.4903, 0.8127, 0.8359, 0.8206, 0.8127, 0.8359, 0.8206, 0.9888, 0.4976, 0.4903, 0.8241, 0.462, 0.8419, 0.4107, 0.7407, -0.7286, 0.4332, 0.4392, -0.9094, 0.7491, 0.757, -0.7054, 0.7491, 0.757, -0.7054, 0.4332, 0.4392, -0.9094, 0.8323, 0.4537, -0.8118, 0.4957, -0.0035, -0.9948, 0.5, -0.5, -1, 0.959, -0.0024, -0.9576, 0.959, -0.0024, -0.9576, 0.5, -0.5, -1, 0.9584, -0.4897, -0.9584, 1, 0, 0.5, 0.9918, -0.4911, 0.4966, 0.9576, -0.0024, 0.959, 0.9576, -0.0024, 0.959, 0.9918, -0.4911, 0.4966, 0.9588, -0.4891, 0.9583, -1, 0, -0.5, -0.9985, -0.4987, -0.5, -0.9688, 0, -0.9688, -0.9688, 0, -0.9688, -0.9985, -0.4987, -0.5, -0.9688, -0.5, -0.9688, -0.5, 0, 1, -0.5, -0.5, 1, -0.9688, 0, 0.9687, -0.9688, 0, 0.9687, -0.5, -0.5, 1, -0.9579, -0.4901, 0.9583, -1, 0, 0.5, -1, -0.5, 0.5, -1, 0, 0, -1, 0, 0, -1, -0.5, 0.5, -1, -0.5, 0, 1, 0, -0.5, 1, -0.5, -0.5, 1, 0, 0, 1, 0, 0, 1, -0.5, -0.5, 1, -0.5, 0, 0.9517, 0.9495, -0.4773, 0.9903, 0.4976, -0.4889, 0.9684, 0.9678, 0.0009, 0.9684, 0.9678, 0.0009, 0.9903, 0.4976, -0.4889, 1, 0.5, 0, 0.9584, -0.9584, -0.4897, 0.5, -1, -0.5, 0.9606, -0.9599, -0.0033, 0.9606, -0.9599, -0.0033, 0.5, -1, -0.5, 0.5, -1, 0, -0.9588, 0.9579, 0.4896, -1, 0.5, 0.5, -0.9688, 0.9687, 0, -0.9688, 0.9687, 0, -1, 0.5, 0.5, -1, 0.5, 0, -0.9581, 0.9586, -0.4896, -0.5001, 0.9981, -0.4982, -0.9688, 0.9687, 0, -0.9688, 0.9687, 0, -0.5001, 0.9981, -0.4982, -0.5, 1, 0, -0.83, 0.8364, -0.8336, -0.4899, 0.9473, -0.9483, -0.9581, 0.9586, -0.4896, -0.9581, 0.9586, -0.4896, -0.4899, 0.9473, -0.9483, -0.5001, 0.9981, -0.4982, 0.8346, -0.8342, -0.8345, 0.4897, -0.9584, -0.9584, 0.9584, -0.9584, -0.4897, 0.9584, -0.9584, -0.4897, 0.4897, -0.9584, -0.9584, 0.5, -1, -0.5, 0.7491, 0.757, -0.7054, 0.8323, 0.4537, -0.8118, 0.9517, 0.9495, -0.4773, 0.9517, 0.9495, -0.4773, 0.8323, 0.4537, -0.8118, 0.9903, 0.4976, -0.4889, 0.959, -0.0024, -0.9576, 0.9584, -0.4897, -0.9584, 1, 0, -0.5, 1, 0, -0.5, 0.9584, -0.4897, -0.9584, 1, -0.5, -0.5, -1, 0, 0, -1, -0.5, 0, -1, 0, -0.5, -1, 0, -0.5, -1, -0.5, 0, -0.9985, -0.4987, -0.5, -0.9688, 0.9687, 0, -1, 0.5, 0, -0.9581, 0.9586, -0.4896, -0.9581, 0.9586, -0.4896, -1, 0.5, 0, -1, 0.5, -0.5, -0.8391, 0.8276, 0.8336, -0.9588, 0.4891, 0.9583, -0.9588, 0.9579, 0.4896, -0.9588, 0.9579, 0.4896, -0.9588, 0.4891, 0.9583, -1, 0.5, 0.5, -0.9688, 0, 0.9687, -0.9579, -0.4901, 0.9583, -1, 0, 0.5, -1, 0, 0.5, -0.9579, -0.4901, 0.9583, -1, -0.5, 0.5, 1, 0, 0, 1, -0.5, 0, 1, 0, 0.5, 1, 0, 0.5, 1, -0.5, 0, 0.9918, -0.4911, 0.4966, 0.9684, 0.9678, 0.0009, 1, 0.5, 0, 0.9579, 0.9588, 0.4896, 0.9579, 0.9588, 0.4896, 1, 0.5, 0, 0.9888, 0.4976, 0.4903, 0.9606, -0.9599, -0.0033, 0.5, -1, 0, 0.861, -0.8512, 0.4495, 0.861, -0.8512, 0.4495, 0.5, -1, 0, 0.4895, -0.98, 0.4869, -0.9688, 0.9687, 0, -0.5, 1, 0, -0.9588, 0.9579, 0.4896, -0.9588, 0.9579, 0.4896, -0.5, 1, 0, -0.5, 1, 0.5, 1, 0.5, 0, 1, 0, 0, 0.9888, 0.4976, 0.4903, 0.9888, 0.4976, 0.4903, 1, 0, 0, 1, 0, 0.5, -0.9588, 0.4891, 0.9583, -0.9688, 0, 0.9687, -1, 0.5, 0.5, -1, 0.5, 0.5, -0.9688, 0, 0.9687, -1, 0, 0.5, -1, 0.5, 0, -1, 0, 0, -1, 0.5, -0.5, -1, 0.5, -0.5, -1, 0, 0, -1, 0, -0.5, 0.8323, 0.4537, -0.8118, 0.959, -0.0024, -0.9576, 0.9903, 0.4976, -0.4889, 0.9903, 0.4976, -0.4889, 0.959, -0.0024, -0.9576, 1, 0, -0.5, -1, 0.5, 0.5, -1, 0, 0.5, -1, 0.5, 0, -1, 0.5, 0, -1, 0, 0.5, -1, 0, 0, 0.9903, 0.4976, -0.4889, 1, 0, -0.5, 1, 0.5, 0, 1, 0.5, 0, 1, 0, -0.5, 1, 0, 0, 0.4332, 0.4392, -0.9094, 0.4957, -0.0035, -0.9948, 0.8323, 0.4537, -0.8118, 0.8323, 0.4537, -0.8118, 0.4957, -0.0035, -0.9948, 0.959, -0.0024, -0.9576, 0.9888, 0.4976, 0.4903, 1, 0, 0.5, 0.8241, 0.462, 0.8419, 0.8241, 0.462, 0.8419, 1, 0, 0.5, 0.9576, -0.0024, 0.959, -1, 0.5, -0.5, -1, 0, -0.5, -0.9581, 0.4898, -0.9584, -0.9581, 0.4898, -0.9584, -1, 0, -0.5, -0.9688, 0, -0.9688, -0.5, 0.5, 1, -0.5, 0, 1, -0.9588, 0.4891, 0.9583, -0.9588, 0.4891, 0.9583, -0.5, 0, 1, -0.9688, 0, 0.9687, 1, -0.5, 0, 0.9606, -0.9599, -0.0033, 0.9918, -0.4911, 0.4966, 0.9918, -0.4911, 0.4966, 0.9606, -0.9599, -0.0033, 0.861, -0.8512, 0.4495, -0.9579, -0.4901, 0.9583, -0.8276, -0.8391, 0.8336, -1, -0.5, 0.5, -1, -0.5, 0.5, -0.8276, -0.8391, 0.8336, -0.9579, -0.9588, 0.4896, -1, -0.5, 0, -0.9672, -0.9674, 0, -0.9985, -0.4987, -0.5, -0.9985, -0.4987, -0.5, -0.9672, -0.9674, 0, -0.9503, -0.9526, -0.5, 0.9584, -0.4897, -0.9584, 0.8346, -0.8342, -0.8345, 1, -0.5, -0.5, 1, -0.5, -0.5, 0.8346, -0.8342, -0.8345, 0.9584, -0.9584, -0.4897, 1, -0.5, -0.5, 0.9584, -0.9584, -0.4897, 1, -0.5, 0, 1, -0.5, 0, 0.9584, -0.9584, -0.4897, 0.9606, -0.9599, -0.0033, -1, -0.5, 0.5, -0.9579, -0.9588, 0.4896, -1, -0.5, 0, -1, -0.5, 0, -0.9579, -0.9588, 0.4896, -0.9672, -0.9674, 0, -0.5, -0.5, 1, -0.4891, -0.9588, 0.9583, -0.9579, -0.4901, 0.9583, -0.9579, -0.4901, 0.9583, -0.4891, -0.9588, 0.9583, -0.8276, -0.8391, 0.8336, -0.9985, -0.4987, -0.5, -0.9503, -0.9526, -0.5, -0.9688, -0.5, -0.9688, -0.9688, -0.5, -0.9688, -0.9503, -0.9526, -0.5, -0.9563, -0.9565, -0.9583, 0.9918, -0.4911, 0.4966, 0.861, -0.8512, 0.4495, 0.9588, -0.4891, 0.9583, 0.9588, -0.4891, 0.9583, 0.861, -0.8512, 0.4495, 0.8251, -0.8009, 0.8162, 0.5, -0.5, -1, 0.4897, -0.9584, -0.9584, 0.9584, -0.4897, -0.9584, 0.9584, -0.4897, -0.9584, 0.4897, -0.9584, -0.9584, 0.8346, -0.8342, -0.8345, -0.5, -0.5, -1, -0.5, -0.9688, -0.9688, 0, -0.5, -1, 0, -0.5, -1, -0.5, -0.9688, -0.9688, 0, -0.9688, -0.9688, 0.4976, -0.4889, 0.9903, 0.462, -0.8241, 0.8419, 0, -0.5, 1, 0, -0.5, 1, 0.462, -0.8241, 0.8419, -0.0024, -0.9576, 0.959, 0.4889, 0.4976, 0.9903, 0.5, 0, 1, 0, 0.5, 1, 0, 0.5, 1, 0.5, 0, 1, 0, 0, 1, -0.5, 0.5, -1, -0.5, 0, -1, -0.0049, 0.4851, -0.9847, -0.0049, 0.4851, -0.9847, -0.5, 0, -1, 0, 0, -1, -0.0004, 0.9972, 0.0028, 0.4954, 0.9849, 0.0159, 0, 1, 0.5, 0, 1, 0.5, 0.4954, 0.9849, 0.0159, 0.4997, 0.9991, 0.5009, 0, -1, 0, -0.5, -1, 0, 0, -1, 0.5, 0, -1, 0.5, -0.5, -1, 0, -0.5, -1, 0.5, 0, -0.9688, -0.9688, -0.5, -0.9688, -0.9688, 0, -1, -0.5, 0, -1, -0.5, -0.5, -0.9688, -0.9688, -0.4985, -0.9987, -0.5, -0.0128, 0.8148, -0.8288, 0.4107, 0.7407, -0.7286, -0.0031, 0.9615, -0.4631, -0.0031, 0.9615, -0.4631, 0.4107, 0.7407, -0.7286, 0.4783, 0.9272, -0.4238, -0.0031, 0.9615, -0.4631, 0.4783, 0.9272, -0.4238, -0.0004, 0.9972, 0.0028, -0.0004, 0.9972, 0.0028, 0.4783, 0.9272, -0.4238, 0.4954, 0.9849, 0.0159, 0, -1, -0.5, -0.4985, -0.9987, -0.5, 0, -1, 0, 0, -1, 0, -0.4985, -0.9987, -0.5, -0.5, -1, 0, 0.5, 0, 1, 0.4976, -0.4889, 0.9903, 0, 0, 1, 0, 0, 1, 0.4976, -0.4889, 0.9903, 0, -0.5, 1, -0.5, 0, -1, -0.5, -0.5, -1, 0, 0, -1, 0, 0, -1, -0.5, -0.5, -1, 0, -0.5, -1, -0.4899, 0.9473, -0.9483, -0.5, 0.5, -1, -0.0128, 0.8148, -0.8288, -0.0128, 0.8148, -0.8288, -0.5, 0.5, -1, -0.0049, 0.4851, -0.9847, 0, -1, 0.5, -0.5, -1, 0.5, -0.0024, -0.9576, 0.959, -0.0024, -0.9576, 0.959, -0.5, -1, 0.5, -0.4891, -0.9588, 0.9583, 0.4891, 0.9588, 0.9583, 0.4889, 0.4976, 0.9903, 0, 0.9687, 0.9687, 0, 0.9687, 0.9687, 0.4889, 0.4976, 0.9903, 0, 0.5, 1, 0, 1, 0.5, 0.4997, 0.9991, 0.5009, 0, 0.9687, 0.9687, 0, 0.9687, 0.9687, 0.4997, 0.9991, 0.5009, 0.4891, 0.9588, 0.9583, 0.4997, 0.9991, 0.5009, 0.9579, 0.9588, 0.4896, 0.4891, 0.9588, 0.9583, 0.4891, 0.9588, 0.9583, 0.9579, 0.9588, 0.4896, 0.8127, 0.8359, 0.8206, 0.8127, 0.8359, 0.8206, 0.8241, 0.462, 0.8419, 0.4891, 0.9588, 0.9583, 0.4891, 0.9588, 0.9583, 0.8241, 0.462, 0.8419, 0.4889, 0.4976, 0.9903, 0.9576, -0.0024, 0.959, 0.9588, -0.4891, 0.9583, 0.5, 0, 1, 0.5, 0, 1, 0.9588, -0.4891, 0.9583, 0.4976, -0.4889, 0.9903, 0.4783, 0.9272, -0.4238, 0.9517, 0.9495, -0.4773, 0.4954, 0.9849, 0.0159, 0.4954, 0.9849, 0.0159, 0.9517, 0.9495, -0.4773, 0.9684, 0.9678, 0.0009, 0.4107, 0.7407, -0.7286, 0.7491, 0.757, -0.7054, 0.4783, 0.9272, -0.4238, 0.4783, 0.9272, -0.4238, 0.7491, 0.757, -0.7054, 0.9517, 0.9495, -0.4773, 0.4954, 0.9849, 0.0159, 0.9684, 0.9678, 0.0009, 0.4997, 0.9991, 0.5009, 0.4997, 0.9991, 0.5009, 0.9684, 0.9678, 0.0009, 0.9579, 0.9588, 0.4896, 0.8241, 0.462, 0.8419, 0.9576, -0.0024, 0.959, 0.4889, 0.4976, 0.9903, 0.4889, 0.4976, 0.9903, 0.9576, -0.0024, 0.959, 0.5, 0, 1, 0.9588, -0.4891, 0.9583, 0.8251, -0.8009, 0.8162, 0.4976, -0.4889, 0.9903, 0.4976, -0.4889, 0.9903, 0.8251, -0.8009, 0.8162, 0.462, -0.8241, 0.8419, 0, -0.5, -1, 0, -0.9688, -0.9688, 0.5, -0.5, -1, 0.5, -0.5, -1, 0, -0.9688, -0.9688, 0.4897, -0.9584, -0.9584, -0.0049, 0.4851, -0.9847, 0, 0, -1, 0.4332, 0.4392, -0.9094, 0.4332, 0.4392, -0.9094, 0, 0, -1, 0.4957, -0.0035, -0.9948, 0.5, -1, 0, 0, -1, 0, 0.4895, -0.98, 0.4869, 0.4895, -0.98, 0.4869, 0, -1, 0, 0, -1, 0.5, 0.4897, -0.9584, -0.9584, 0, -0.9688, -0.9688, 0.5, -1, -0.5, 0.5, -1, -0.5, 0, -0.9688, -0.9688, 0, -1, -0.5, 0.5, -1, -0.5, 0, -1, -0.5, 0.5, -1, 0, 0.5, -1, 0, 0, -1, -0.5, 0, -1, 0, 0, 0, -1, 0, -0.5, -1, 0.4957, -0.0035, -0.9948, 0.4957, -0.0035, -0.9948, 0, -0.5, -1, 0.5, -0.5, -1, -0.0128, 0.8148, -0.8288, -0.0049, 0.4851, -0.9847, 0.4107, 0.7407, -0.7286, 0.4107, 0.7407, -0.7286, -0.0049, 0.4851, -0.9847, 0.4332, 0.4392, -0.9094, 0.4895, -0.98, 0.4869, 0, -1, 0.5, 0.462, -0.8241, 0.8419, 0.462, -0.8241, 0.8419, 0, -1, 0.5, -0.0024, -0.9576, 0.959, -0.5, -1, 0.5, -0.9579, -0.9588, 0.4896, -0.4891, -0.9588, 0.9583, -0.4891, -0.9588, 0.9583, -0.9579, -0.9588, 0.4896, -0.8276, -0.8391, 0.8336, -0.83, 0.8364, -0.8336, -0.9581, 0.4898, -0.9584, -0.4899, 0.9473, -0.9483, -0.4899, 0.9473, -0.9483, -0.9581, 0.4898, -0.9584, -0.5, 0.5, -1, -0.9688, 0, -0.9688, -0.9688, -0.5, -0.9688, -0.5, 0, -1, -0.5, 0, -1, -0.9688, -0.5, -0.9688, -0.5, -0.5, -1, -0.4985, -0.9987, -0.5, -0.9503, -0.9526, -0.5, -0.5, -1, 0, -0.5, -1, 0, -0.9503, -0.9526, -0.5, -0.9672, -0.9674, 0, -0.5, -0.9688, -0.9688, -0.9563, -0.9565, -0.9583, -0.4985, -0.9987, -0.5, -0.4985, -0.9987, -0.5, -0.9563, -0.9565, -0.9583, -0.9503, -0.9526, -0.5, -0.5, -1, 0, -0.9672, -0.9674, 0, -0.5, -1, 0.5, -0.5, -1, 0.5, -0.9672, -0.9674, 0, -0.9579, -0.9588, 0.4896, -0.9581, 0.4898, -0.9584, -0.9688, 0, -0.9688, -0.5, 0.5, -1, -0.5, 0.5, -1, -0.9688, 0, -0.9688, -0.5, 0, -1, -0.9688, -0.5, -0.9688, -0.9563, -0.9565, -0.9583, -0.5, -0.5, -1, -0.5, -0.5, -1, -0.9563, -0.9565, -0.9583, -0.5, -0.9688, -0.9688, 0, -0.5, 1, -0.0024, -0.9576, 0.959, -0.5, -0.5, 1, -0.5, -0.5, 1, -0.0024, -0.9576, 0.959, -0.4891, -0.9588, 0.9583, 0, 0.5, 1, 0, 0, 1, -0.5, 0.5, 1, -0.5, 0.5, 1, 0, 0, 1, -0.5, 0, 1, -0.5, 1, 0, -0.0004, 0.9972, 0.0028, -0.5, 1, 0.5, -0.5, 1, 0.5, -0.0004, 0.9972, 0.0028, 0, 1, 0.5, -0.4899, 0.9473, -0.9483, -0.0128, 0.8148, -0.8288, -0.5001, 0.9981, -0.4982, -0.5001, 0.9981, -0.4982, -0.0128, 0.8148, -0.8288, -0.0031, 0.9615, -0.4631, -0.5001, 0.9981, -0.4982, -0.0031, 0.9615, -0.4631, -0.5, 1, 0, -0.5, 1, 0, -0.0031, 0.9615, -0.4631, -0.0004, 0.9972, 0.0028, 0, 0, 1, 0, -0.5, 1, -0.5, 0, 1, -0.5, 0, 1, 0, -0.5, 1, -0.5, -0.5, 1, 0, 0.9687, 0.9687, 0, 0.5, 1, -0.4901, 0.9579, 0.9583, -0.4901, 0.9579, 0.9583, 0, 0.5, 1, -0.5, 0.5, 1, -0.5, 1, 0.5, 0, 1, 0.5, -0.4901, 0.9579, 0.9583, -0.4901, 0.9579, 0.9583, 0, 1, 0.5, 0, 0.9687, 0.9687) @@ -174,15 +177,20 @@ material_override = ExtResource("5_6uoht") mesh = ExtResource("6_n5nl5") skeleton = NodePath("../..") +[node name="Block4" type="MeshInstance3D" parent="Node3D/CSGCombiner3D/Terrain/StaticBody3D"] +transform = Transform3D(0.101937, -9.23056e-05, 0.0442093, 4.26066e-05, 0.111111, 0.000133748, -0.0442094, -0.000105752, 0.101937, 2.51169, -0.0436256, 5.48679) +material_override = ExtResource("5_6uoht") +mesh = ExtResource("6_n5nl5") +skeleton = NodePath("../..") + +[node name="CollisionShape3D2" type="CollisionShape3D" parent="Node3D/CSGCombiner3D/Terrain/StaticBody3D"] +transform = Transform3D(0.101937, -9.23056e-05, 0.0442093, 4.26066e-05, 0.111111, 0.000133748, -0.0442094, -0.000105752, 0.101937, 2.51169, -0.0436256, 5.48679) +shape = SubResource("ConcavePolygonShape3D_0dt82") + [node name="CollisionShape3D" type="CollisionShape3D" parent="Node3D/CSGCombiner3D/Terrain/StaticBody3D"] transform = Transform3D(1, 0, 2.98023e-08, 0, 1, 0, -2.98023e-08, 0, 1, -2.38419e-07, 0, -4.76837e-07) shape = SubResource("ConcavePolygonShape3D_fi5wi") -[node name="Block4" type="MeshInstance3D" parent="Node3D/CSGCombiner3D/Terrain"] -transform = Transform3D(0.697791, -0.00112981, 0.7163, 0.000383459, 0.999999, 0.00120373, -0.716301, -0.000565271, 0.697791, 16.374, 5.51781, -15.1386) -material_override = ExtResource("5_6uoht") -mesh = ExtResource("6_n5nl5") - [node name="CollisionShape3D" type="CollisionShape3D" parent="Node3D/CSGCombiner3D/Terrain"] transform = Transform3D(0.697791, -0.00112981, 0.7163, 0.000383459, 0.999999, 0.00120373, -0.716301, -0.000565271, 0.697791, 16.374, 5.51781, -15.1386) shape = SubResource("ConcavePolygonShape3D_l4k6h") diff --git a/src/npc/rat/NPC.tscn b/src/npc/rat/NPC.tscn index 52c690b2..95709d9d 100644 --- a/src/npc/rat/NPC.tscn +++ b/src/npc/rat/NPC.tscn @@ -13,9 +13,10 @@ height = 2.8375 [sub_resource type="CylinderShape3D" id="CylinderShape3D_nwuwj"] height = 2.24425 -radius = 1.00578 +radius = 1.941 [node name="NPC" type="Node3D"] +transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 0, 0) script = ExtResource("1_cpdf2") Dialogue = ExtResource("2_uo38w") @@ -23,7 +24,6 @@ Dialogue = ExtResource("2_uo38w") unique_name_in_owner = true transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, 0) gi_mode = 0 -pixel_size = 0.005 billboard = 2 texture_filter = 0 texture = ExtResource("1_0r0wh") diff --git a/src/player/Player.cs b/src/player/Player.cs index ab0dd791..62ec65eb 100644 --- a/src/player/Player.cs +++ b/src/player/Player.cs @@ -16,6 +16,10 @@ namespace GameJamDungeon PlayerData PlayerData { get; } public Vector3 GetGlobalInputVector(); + + public float GetLeftStrafeInputVector(); + + public float GetRightStrafeInputVector(); } [Meta(typeof(IAutoNode))] @@ -139,8 +143,7 @@ namespace GameJamDungeon public override void _UnhandledInput(InputEvent @event) { - var attackIsPressed = Input.IsActionJustPressed(GameInputs.Attack); - if (attackIsPressed && !GameRepo.IsWithinDialogueSpace) + if (Input.IsActionJustPressed(GameInputs.Attack)) PlayerLogic.Input(new PlayerLogic.Input.Attack()); } @@ -176,7 +179,6 @@ namespace GameJamDungeon public Vector3 GetGlobalInputVector() { var rawInput = Input.GetVector(GameInputs.MoveLeft, GameInputs.MoveRight, GameInputs.MoveUp, GameInputs.MoveDown); - var input = new Vector3 { X = rawInput.X, @@ -185,6 +187,18 @@ namespace GameJamDungeon return input with { Y = 0f }; } + public float GetLeftStrafeInputVector() + { + var leftStrafe = Input.GetActionStrength(GameInputs.StrafeLeft); + return leftStrafe; + } + + public float GetRightStrafeInputVector() + { + var rightStrafe = Input.GetActionStrength(GameInputs.StrafeRight); + return rightStrafe; + } + public void ThrowItem() { var itemScene = GD.Load("res://src/items/throwable/ThrowableItem.tscn"); diff --git a/src/player/state/states/PlayerLogic.State.Alive.cs b/src/player/state/states/PlayerLogic.State.Alive.cs index 4a721c1d..53ffe585 100644 --- a/src/player/state/states/PlayerLogic.State.Alive.cs +++ b/src/player/state/states/PlayerLogic.State.Alive.cs @@ -16,10 +16,12 @@ namespace GameJamDungeon var settings = Get(); var rawInput = player.GetGlobalInputVector(); + var strafeLeftInput = player.GetLeftStrafeInputVector(); + var strafeRightInput = player.GetRightStrafeInputVector(); var transform = player.Transform; transform.Basis = new Basis(Vector3.Up, settings.RotationSpeed * -rawInput.X) * transform.Basis; - var velocity = player.Basis * new Vector3(0, 0, rawInput.Z) * settings.MoveSpeed; + var velocity = player.Basis * new Vector3(strafeRightInput - strafeLeftInput, 0, rawInput.Z) * settings.MoveSpeed; if (Godot.Input.IsActionPressed(GameInputs.Sprint)) velocity *= 3;