Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9e75193731 | |||
| 609078c584 | |||
| 893126ef78 | |||
| 6737668391 | |||
| ca77579168 | |||
| c6559d593a | |||
| e32dac9e6e | |||
| 30b4d1a2eb | |||
| 2fa4ce68e7 | |||
| 80e533d98e | |||
| 0e3e258fd3 | |||
| c7991198ea |
File diff suppressed because it is too large
Load Diff
@@ -20,6 +20,8 @@ script = ExtResource("2_5i7wx")
|
|||||||
material_override = ExtResource("3_u2uhe")
|
material_override = ExtResource("3_u2uhe")
|
||||||
|
|
||||||
[node name="StaticBody3D" type="StaticBody3D" parent="Cube_279" index="0"]
|
[node name="StaticBody3D" type="StaticBody3D" parent="Cube_279" index="0"]
|
||||||
|
collision_layer = 256
|
||||||
|
collision_mask = 65553
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Cube_279/StaticBody3D" index="0"]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Cube_279/StaticBody3D" index="0"]
|
||||||
shape = SubResource("ConcavePolygonShape3D_5i7wx")
|
shape = SubResource("ConcavePolygonShape3D_5i7wx")
|
||||||
@@ -28,12 +30,15 @@ shape = SubResource("ConcavePolygonShape3D_5i7wx")
|
|||||||
material_override = ExtResource("4_jmnc2")
|
material_override = ExtResource("4_jmnc2")
|
||||||
|
|
||||||
[node name="StaticBody3D" type="StaticBody3D" parent="Cylinder_001" index="0"]
|
[node name="StaticBody3D" type="StaticBody3D" parent="Cylinder_001" index="0"]
|
||||||
|
collision_layer = 256
|
||||||
|
collision_mask = 65553
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Cylinder_001/StaticBody3D" index="0"]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Cylinder_001/StaticBody3D" index="0"]
|
||||||
shape = SubResource("ConcavePolygonShape3D_wai75")
|
shape = SubResource("ConcavePolygonShape3D_wai75")
|
||||||
|
|
||||||
[node name="Area3D" type="Area3D" parent="." index="2"]
|
[node name="Area3D" type="Area3D" parent="." index="2"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -36.343, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -36.343, 0)
|
||||||
|
collision_layer = 0
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D" index="0"]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D" index="0"]
|
||||||
shape = SubResource("CylinderShape3D_wai75")
|
shape = SubResource("CylinderShape3D_wai75")
|
||||||
|
|||||||
105
maps/GYMs/enemies.tscn
Normal file
105
maps/GYMs/enemies.tscn
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
[gd_scene load_steps=7 format=3 uid="uid://q7uc1h2jpbd2"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bei4nhkf8lwdo" path="res://player_controller/PlayerController.tscn" id="1_62kkh"]
|
||||||
|
[ext_resource type="Material" uid="uid://31aulub2nqov" path="res://assets/greybox/m_greybox.tres" id="2_3uydm"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dxt0e2ugmttqq" path="res://scenes/enemies/first_enemy.tscn" id="3_3uydm"]
|
||||||
|
|
||||||
|
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_0xm2m"]
|
||||||
|
sky_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
|
||||||
|
ground_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
|
||||||
|
|
||||||
|
[sub_resource type="Sky" id="Sky_h2yge"]
|
||||||
|
sky_material = SubResource("ProceduralSkyMaterial_0xm2m")
|
||||||
|
|
||||||
|
[sub_resource type="Environment" id="Environment_1bvp3"]
|
||||||
|
background_mode = 2
|
||||||
|
sky = SubResource("Sky_h2yge")
|
||||||
|
ambient_light_source = 2
|
||||||
|
ambient_light_color = Color(0.576076, 0.459788, 0.652401, 1)
|
||||||
|
reflected_light_source = 2
|
||||||
|
tonemap_mode = 4
|
||||||
|
tonemap_exposure = 1.32
|
||||||
|
ssao_enabled = true
|
||||||
|
ssao_radius = 3.61
|
||||||
|
ssil_enabled = true
|
||||||
|
ssil_radius = 8.4
|
||||||
|
sdfgi_use_occlusion = true
|
||||||
|
glow_enabled = true
|
||||||
|
|
||||||
|
[node name="Main" type="Node3D"]
|
||||||
|
|
||||||
|
[node name="Player" parent="." instance=ExtResource("1_62kkh")]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 7.5)
|
||||||
|
TutorialDone = true
|
||||||
|
|
||||||
|
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||||
|
environment = SubResource("Environment_1bvp3")
|
||||||
|
|
||||||
|
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||||
|
transform = Transform3D(-0.772218, 0.611111, 0.173844, 0.0446935, -0.220691, 0.974319, 0.633783, 0.760157, 0.143109, 0, 0, 0)
|
||||||
|
shadow_enabled = true
|
||||||
|
|
||||||
|
[node name="Greybox" type="CSGCombiner3D" parent="."]
|
||||||
|
use_collision = true
|
||||||
|
collision_layer = 256
|
||||||
|
collision_mask = 65553
|
||||||
|
|
||||||
|
[node name="CSGBox3D" type="CSGBox3D" parent="Greybox"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.096, -0.5, -46.329)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(100, 1, 190.741)
|
||||||
|
material = ExtResource("2_3uydm")
|
||||||
|
|
||||||
|
[node name="CSGBox3D2" type="CSGBox3D" parent="Greybox"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -21.346, 4.5, 2.7915)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(6.5, 11, 5.5)
|
||||||
|
material = ExtResource("2_3uydm")
|
||||||
|
|
||||||
|
[node name="CSGBox3D6" type="CSGBox3D" parent="Greybox"]
|
||||||
|
transform = Transform3D(0.70710677, 0, -0.70710677, 0, 1, 0, 0.70710677, 0, 0.70710677, -15.846001, 2.75, 2.0415)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(6.5, 7.5, 11)
|
||||||
|
material = ExtResource("2_3uydm")
|
||||||
|
|
||||||
|
[node name="CSGBox3D7" type="CSGBox3D" parent="Greybox"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.346001, 1, 1.0415001)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(6.5, 4, 17)
|
||||||
|
material = ExtResource("2_3uydm")
|
||||||
|
|
||||||
|
[node name="CSGBox3D8" type="CSGBox3D" parent="Greybox"]
|
||||||
|
transform = Transform3D(0.81915206, 0, 0.57357645, 0, 1, 0, -0.57357645, 0, 0.81915206, -7.3460007, 0, -3.9585)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(6.5, 4, 17)
|
||||||
|
material = ExtResource("2_3uydm")
|
||||||
|
|
||||||
|
[node name="CSGBox3D3" type="CSGBox3D" parent="Greybox"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18.154, 4.5, 2.7915)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(6.5, 11, 5.5)
|
||||||
|
material = ExtResource("2_3uydm")
|
||||||
|
|
||||||
|
[node name="CSGBox3D4" type="CSGBox3D" parent="Greybox"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18.154, 4.5, -14.2085)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(6.5, 11, 5.5)
|
||||||
|
material = ExtResource("2_3uydm")
|
||||||
|
|
||||||
|
[node name="CSGBox3D5" type="CSGBox3D" parent="Greybox"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.8460007, 4.5, 17.7915)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(6.5, 11, 5.5)
|
||||||
|
material = ExtResource("2_3uydm")
|
||||||
|
|
||||||
|
[node name="Enemy" parent="." node_paths=PackedStringArray("Target") instance=ExtResource("3_3uydm")]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -16.83681)
|
||||||
|
Target = NodePath("../Player")
|
||||||
|
|
||||||
|
[node name="Enemy2" parent="." node_paths=PackedStringArray("Target") instance=ExtResource("3_3uydm")]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3, 0, -16.83681)
|
||||||
|
Target = NodePath("../Player")
|
||||||
|
|
||||||
|
[node name="Enemy3" parent="." node_paths=PackedStringArray("Target") instance=ExtResource("3_3uydm")]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.5, 0, -16.83681)
|
||||||
|
Target = NodePath("../Player")
|
||||||
@@ -30,6 +30,7 @@ glow_enabled = true
|
|||||||
|
|
||||||
[node name="Player" parent="." instance=ExtResource("1_ig7tw")]
|
[node name="Player" parent="." instance=ExtResource("1_ig7tw")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.7981, 1.6118, 39.3006)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.7981, 1.6118, 39.3006)
|
||||||
|
TutorialDone = true
|
||||||
|
|
||||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||||
environment = SubResource("Environment_1bvp3")
|
environment = SubResource("Environment_1bvp3")
|
||||||
|
|||||||
@@ -46,8 +46,8 @@ visible = false
|
|||||||
|
|
||||||
[node name="Greybox" type="CSGCombiner3D" parent="."]
|
[node name="Greybox" type="CSGCombiner3D" parent="."]
|
||||||
use_collision = true
|
use_collision = true
|
||||||
collision_layer = 3
|
collision_layer = 256
|
||||||
collision_mask = 5
|
collision_mask = 65553
|
||||||
|
|
||||||
[node name="CSGBox3D" type="CSGBox3D" parent="Greybox"]
|
[node name="CSGBox3D" type="CSGBox3D" parent="Greybox"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.096, -0.5, -46.329)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.096, -0.5, -46.329)
|
||||||
@@ -133,6 +133,21 @@ material = ExtResource("3_vvhq3")
|
|||||||
transform = Transform3D(5, 0, 0, 0, -2.18557e-07, 5, 0, -5, -2.18557e-07, 1, 0.1, -9.5)
|
transform = Transform3D(5, 0, 0, 0, -2.18557e-07, 5, 0, -5, -2.18557e-07, 1, 0.1, -9.5)
|
||||||
text = "10m"
|
text = "10m"
|
||||||
|
|
||||||
|
[node name="Label3D6" type="Label3D" parent="Greybox/RunningTrack"]
|
||||||
|
transform = Transform3D(5, 0, 0, 0, -2.18557e-07, 5, 0, -5, -2.18557e-07, 27.5, 0.1, 1)
|
||||||
|
text = "10deg
|
||||||
|
"
|
||||||
|
|
||||||
|
[node name="Label3D7" type="Label3D" parent="Greybox/RunningTrack"]
|
||||||
|
transform = Transform3D(5, 0, 0, 0, -2.18557e-07, 5, 0, -5, -2.18557e-07, 30.5, 0.1, 1)
|
||||||
|
text = "20deg
|
||||||
|
"
|
||||||
|
|
||||||
|
[node name="Label3D8" type="Label3D" parent="Greybox/RunningTrack"]
|
||||||
|
transform = Transform3D(5, 0, 0, 0, -2.18557e-07, 5, 0, -5, -2.18557e-07, 33.5, 0.1, 1)
|
||||||
|
text = "30deg
|
||||||
|
"
|
||||||
|
|
||||||
[node name="Label3D2" type="Label3D" parent="Greybox/RunningTrack"]
|
[node name="Label3D2" type="Label3D" parent="Greybox/RunningTrack"]
|
||||||
transform = Transform3D(5, 0, 0, 0, -2.18557e-07, 5, 0, -5, -2.18557e-07, 1, 0.1, -19.5)
|
transform = Transform3D(5, 0, 0, 0, -2.18557e-07, 5, 0, -5, -2.18557e-07, 1, 0.1, -19.5)
|
||||||
text = "20m"
|
text = "20m"
|
||||||
@@ -367,6 +382,60 @@ use_collision = true
|
|||||||
size = Vector3(7.5, 20, 10)
|
size = Vector3(7.5, 20, 10)
|
||||||
material = ExtResource("3_vvhq3")
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D41" type="CSGBox3D" parent="Greybox/JumpHeights"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 22.75, 5, -1.5)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(12.5, 10, 3)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D47" type="CSGBox3D" parent="Greybox/JumpHeights"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 0.9848078, 0.17364816, 0, -0.17364816, 0.9848078, 22.75, 0.03095889, -30.695885)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(12.5, 10, 58)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D48" type="CSGBox3D" parent="Greybox/JumpHeights"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 0.9396926, 0.34202012, 0, -0.34202012, 0.9396926, 30.5, 1.5878377, -16.713436)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(3, 6.5, 31.5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D49" type="CSGBox3D" parent="Greybox/JumpHeights"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 0.86602545, 0.5, 0, -0.5, 0.86602545, 33.5, 2.5053406, -10.524445)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(3, 5.5, 20.5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D42" type="CSGBox3D" parent="Greybox/JumpHeights"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30.5, 5, -1.5)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(3, 10, 3)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D43" type="CSGBox3D" parent="Greybox/JumpHeights"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 33.5, 5, -1.5)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(3, 10, 3)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D44" type="CSGBox3D" parent="Greybox/JumpHeights"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 36.5, 5, -1.5)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(3, 10, 3)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D45" type="CSGBox3D" parent="Greybox/JumpHeights"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 39.5, 5, -1.5)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(3, 10, 3)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D46" type="CSGBox3D" parent="Greybox/JumpHeights"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 42.5, 5, -1.5)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(3, 10, 3)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
[node name="CSGBox3D34" type="CSGBox3D" parent="Greybox/JumpHeights"]
|
[node name="CSGBox3D34" type="CSGBox3D" parent="Greybox/JumpHeights"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -24.5, 10, -15)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -24.5, 10, -15)
|
||||||
use_collision = true
|
use_collision = true
|
||||||
@@ -437,6 +506,162 @@ use_collision = true
|
|||||||
size = Vector3(5, 3, 2)
|
size = Vector3(5, 3, 2)
|
||||||
material = ExtResource("3_vvhq3")
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D38" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 21.5, 2.25, 22.5)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 5, 5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D39" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 21.25, 0.5, 22.5)
|
||||||
|
operation = 2
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 3, 1.5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D40" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 28.5, 2.25, 22.5)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 5, 5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D41" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 28.25, 0.25, 22.5)
|
||||||
|
operation = 2
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 2.5, 1.5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D42" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 35.5, 2.25, 22.5)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 5, 5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D43" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 35.25, -0.5, 22.5)
|
||||||
|
operation = 2
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 3, 1.5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D44" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 42.5, 2.25, 22.5)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 5, 5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D45" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 42.25, -1, 22.5)
|
||||||
|
operation = 2
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 3, 1.5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D46" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 21.5, 2.25, 31.5)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 5, 5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D47" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 21.25, 0.5, 31.5)
|
||||||
|
operation = 2
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 3, 1.5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D48" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 28.5, 2.25, 31.5)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 5, 5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D49" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 28.25, 0.25, 31.5)
|
||||||
|
operation = 2
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 2.5, 1.5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D50" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 35.5, 2.25, 31.5)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 5, 5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D51" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 35.25, -0.5, 31.5)
|
||||||
|
operation = 2
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 3, 1.5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D52" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 42.5, 2.25, 31.5)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 5, 5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D53" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 42.25, -1, 31.5)
|
||||||
|
operation = 2
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 3, 1.5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D54" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 21.5, 2.25, 39.5)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 5, 5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D55" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 21.25, 0.5, 39.5)
|
||||||
|
operation = 2
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 3, 1.5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D56" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 28.5, 2.25, 39.5)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 5, 5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D57" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 28.25, 0.25, 39.5)
|
||||||
|
operation = 2
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 2.5, 1.5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D58" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 35.5, 2.25, 39.5)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 5, 5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D59" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 35.25, -0.5, 39.5)
|
||||||
|
operation = 2
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 3, 1.5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D60" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 42.5, 2.25, 39.5)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 5, 5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
|
[node name="CSGBox3D61" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
|
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 42.25, -1, 39.5)
|
||||||
|
operation = 2
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(5, 3, 1.5)
|
||||||
|
material = ExtResource("3_vvhq3")
|
||||||
|
|
||||||
[node name="CSGBox3D32" type="CSGBox3D" parent="Greybox/Passageways"]
|
[node name="CSGBox3D32" type="CSGBox3D" parent="Greybox/Passageways"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, 2.25, -26.5)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, 2.25, -26.5)
|
||||||
use_collision = true
|
use_collision = true
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=49 format=3 uid="uid://bei4nhkf8lwdo"]
|
[gd_scene load_steps=50 format=3 uid="uid://bei4nhkf8lwdo"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://bbbrf5ckydfna" path="res://player_controller/Scripts/PlayerController.cs" id="1_poq2x"]
|
[ext_resource type="Script" uid="uid://bbbrf5ckydfna" path="res://player_controller/Scripts/PlayerController.cs" id="1_poq2x"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cf3rrgr1imvv4" path="res://scenes/path/path.tscn" id="2_6lejt"]
|
[ext_resource type="PackedScene" uid="uid://cf3rrgr1imvv4" path="res://scenes/path/path.tscn" id="2_6lejt"]
|
||||||
@@ -11,7 +11,6 @@
|
|||||||
[ext_resource type="Resource" uid="uid://brswsknpgwal2" path="res://systems/inputs/base_mode/move_front.tres" id="7_m8gvy"]
|
[ext_resource type="Resource" uid="uid://brswsknpgwal2" path="res://systems/inputs/base_mode/move_front.tres" id="7_m8gvy"]
|
||||||
[ext_resource type="Resource" uid="uid://s1l0n1iitc6m" path="res://systems/inputs/base_mode/move_back.tres" id="8_jb43f"]
|
[ext_resource type="Resource" uid="uid://s1l0n1iitc6m" path="res://systems/inputs/base_mode/move_back.tres" id="8_jb43f"]
|
||||||
[ext_resource type="Resource" uid="uid://j1o5ud0plk4" path="res://systems/inputs/base_mode/aim_release.tres" id="8_lhb11"]
|
[ext_resource type="Resource" uid="uid://j1o5ud0plk4" path="res://systems/inputs/base_mode/aim_release.tres" id="8_lhb11"]
|
||||||
[ext_resource type="Script" uid="uid://dd1yrt7eiiyf4" path="res://player_controller/Scripts/CapsuleCollider.cs" id="8_lmtjd"]
|
|
||||||
[ext_resource type="Resource" uid="uid://c3e0ivgaxrsyb" path="res://systems/inputs/base_mode/aim_down.tres" id="8_obsfv"]
|
[ext_resource type="Resource" uid="uid://c3e0ivgaxrsyb" path="res://systems/inputs/base_mode/aim_down.tres" id="8_obsfv"]
|
||||||
[ext_resource type="PackedScene" uid="uid://wq1okogkhc5l" path="res://systems/mantle/mantle_system.tscn" id="8_qu4wy"]
|
[ext_resource type="PackedScene" uid="uid://wq1okogkhc5l" path="res://systems/mantle/mantle_system.tscn" id="8_qu4wy"]
|
||||||
[ext_resource type="Resource" uid="uid://bebstkm608wxx" path="res://systems/inputs/base_mode/aim_pressed.tres" id="9_nob5r"]
|
[ext_resource type="Resource" uid="uid://bebstkm608wxx" path="res://systems/inputs/base_mode/aim_pressed.tres" id="9_nob5r"]
|
||||||
@@ -24,7 +23,7 @@
|
|||||||
[ext_resource type="Resource" uid="uid://55b0dsvioj08" path="res://systems/inputs/base_mode/jump_pressed.tres" id="13_nob5r"]
|
[ext_resource type="Resource" uid="uid://55b0dsvioj08" path="res://systems/inputs/base_mode/jump_pressed.tres" id="13_nob5r"]
|
||||||
[ext_resource type="Shape3D" uid="uid://keseacdcooot" path="res://player_controller/resources/PlayerShape.tres" id="13_r7i3q"]
|
[ext_resource type="Shape3D" uid="uid://keseacdcooot" path="res://player_controller/resources/PlayerShape.tres" id="13_r7i3q"]
|
||||||
[ext_resource type="Script" uid="uid://b5nk6ntlps3x0" path="res://systems/inputs/input_system.gd" id="16_v31n3"]
|
[ext_resource type="Script" uid="uid://b5nk6ntlps3x0" path="res://systems/inputs/input_system.gd" id="16_v31n3"]
|
||||||
[ext_resource type="Resource" uid="uid://b334rau1yxmm7" path="res://systems/inputs/base_mode/slide.tres" id="17_6lejt"]
|
[ext_resource type="Resource" uid="uid://b334rau1yxmm7" path="res://systems/inputs/base_mode/slide_released.tres" id="17_6lejt"]
|
||||||
[ext_resource type="Resource" uid="uid://htqvokm8mufq" path="res://systems/inputs/base_mode/move.tres" id="17_h6vvl"]
|
[ext_resource type="Resource" uid="uid://htqvokm8mufq" path="res://systems/inputs/base_mode/move.tres" id="17_h6vvl"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cqduhd4opgwvm" path="res://systems/dash/dash_system.tscn" id="18_q5h8a"]
|
[ext_resource type="PackedScene" uid="uid://cqduhd4opgwvm" path="res://systems/dash/dash_system.tscn" id="18_q5h8a"]
|
||||||
[ext_resource type="Resource" uid="uid://bbce5wfwxpns1" path="res://systems/inputs/base_mode/slide_pressed.tres" id="18_q14ux"]
|
[ext_resource type="Resource" uid="uid://bbce5wfwxpns1" path="res://systems/inputs/base_mode/slide_pressed.tres" id="18_q14ux"]
|
||||||
@@ -47,6 +46,9 @@
|
|||||||
[sub_resource type="CapsuleMesh" id="CapsuleMesh_xc2g5"]
|
[sub_resource type="CapsuleMesh" id="CapsuleMesh_xc2g5"]
|
||||||
height = 1.7
|
height = 1.7
|
||||||
|
|
||||||
|
[sub_resource type="SphereShape3D" id="SphereShape3D_6lejt"]
|
||||||
|
radius = 0.45
|
||||||
|
|
||||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nodcl"]
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nodcl"]
|
||||||
transparency = 1
|
transparency = 1
|
||||||
albedo_color = Color(0, 0.627451, 0.6313726, 0.49019608)
|
albedo_color = Color(0, 0.627451, 0.6313726, 0.49019608)
|
||||||
@@ -59,12 +61,16 @@ height = 1.0
|
|||||||
|
|
||||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_6lejt"]
|
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_6lejt"]
|
||||||
radius = 1.0
|
radius = 1.0
|
||||||
height = 3.0
|
height = 3.5
|
||||||
|
|
||||||
|
[sub_resource type="SphereShape3D" id="SphereShape3D_nob5r"]
|
||||||
|
radius = 0.4
|
||||||
|
|
||||||
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_2q0ik"]
|
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_2q0ik"]
|
||||||
blend_mode = 1
|
blend_mode = 1
|
||||||
|
|
||||||
[node name="Player" type="CharacterBody3D"]
|
[node name="Player" type="CharacterBody3D"]
|
||||||
|
collision_mask = 272
|
||||||
script = ExtResource("1_poq2x")
|
script = ExtResource("1_poq2x")
|
||||||
WalkSpeed = 7.5
|
WalkSpeed = 7.5
|
||||||
AccelerationFloor = 4.0
|
AccelerationFloor = 4.0
|
||||||
@@ -84,18 +90,30 @@ DoubleJumpHangTimeInFrames = 3
|
|||||||
DoubleJumpGravityLesseningFactor = 1.5
|
DoubleJumpGravityLesseningFactor = 1.5
|
||||||
WallJumpStartVelocity = 8.0
|
WallJumpStartVelocity = 8.0
|
||||||
MaxNumberOfEmpoweredActions = 3
|
MaxNumberOfEmpoweredActions = 3
|
||||||
SimpleDashStrength = 15.0
|
SimpleDashStrength = 18.0
|
||||||
|
SimpleDashTime = 0.2
|
||||||
AimedDashTime = 0.2
|
AimedDashTime = 0.2
|
||||||
PostDashSpeed = 30.0
|
PostDashSpeed = 30.0
|
||||||
|
SlamSpeed = 80.0
|
||||||
|
FlatGroundSlideSpeedLossRate = 0.996
|
||||||
|
GroundSlideJumpMultiplier = 0.1
|
||||||
|
GroundSlideJumpSpeedFactor = 0.1
|
||||||
|
GroundSlideDownSlopeAcceleration = 0.2
|
||||||
|
GroundSlideDownSlopeMaxSpeed = 30.0
|
||||||
|
AirGlideVSpeed = 4.0
|
||||||
|
AccelerationAirGlide = 0.4
|
||||||
|
AirGlideVerticalAcceleration = 8.0
|
||||||
|
AirGlideJumpMultiplier = 0.1
|
||||||
|
AirGlideJumpSpeedFactor = 0.05
|
||||||
WallHugGravityLesseningFactor = 15.0
|
WallHugGravityLesseningFactor = 15.0
|
||||||
WallHugDownwardMaxSpeed = 8.0
|
WallHugDownwardMaxSpeed = 4.0
|
||||||
WallHugHorizontalDeceleration = 0.5
|
WallHugHorizontalDeceleration = 1.0
|
||||||
|
|
||||||
[node name="WallRunSnapper" type="RayCast3D" parent="."]
|
[node name="WallRunSnapper" type="RayCast3D" parent="."]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
transform = Transform3D(0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994, 0, 0, 0)
|
transform = Transform3D(0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994, 0, 0, 0)
|
||||||
target_position = Vector3(0, 0, -5)
|
target_position = Vector3(0, 0, -5)
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="InputController" type="Node3D" parent="."]
|
[node name="InputController" type="Node3D" parent="."]
|
||||||
script = ExtResource("16_v31n3")
|
script = ExtResource("16_v31n3")
|
||||||
@@ -112,8 +130,8 @@ aim_pressed = ExtResource("9_nob5r")
|
|||||||
aim_released = ExtResource("8_lhb11")
|
aim_released = ExtResource("8_lhb11")
|
||||||
jump = ExtResource("10_4u7i3")
|
jump = ExtResource("10_4u7i3")
|
||||||
jump_pressed = ExtResource("13_nob5r")
|
jump_pressed = ExtResource("13_nob5r")
|
||||||
slide = ExtResource("17_6lejt")
|
|
||||||
slide_pressed = ExtResource("18_q14ux")
|
slide_pressed = ExtResource("18_q14ux")
|
||||||
|
slide_released = ExtResource("17_6lejt")
|
||||||
hit = ExtResource("11_cresl")
|
hit = ExtResource("11_cresl")
|
||||||
parry = ExtResource("18_ruloh")
|
parry = ExtResource("18_ruloh")
|
||||||
dash = ExtResource("12_34snm")
|
dash = ExtResource("12_34snm")
|
||||||
@@ -124,17 +142,22 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.85, 0)
|
|||||||
visible = false
|
visible = false
|
||||||
mesh = SubResource("CapsuleMesh_xc2g5")
|
mesh = SubResource("CapsuleMesh_xc2g5")
|
||||||
|
|
||||||
[node name="CapsuleCollider" type="CollisionShape3D" parent="."]
|
[node name="StandingCollider" type="CollisionShape3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.85, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.85, 0)
|
||||||
shape = ExtResource("13_r7i3q")
|
shape = ExtResource("13_r7i3q")
|
||||||
debug_color = Color(0, 0.6, 0.701961, 0.341176)
|
debug_color = Color(0, 0.6, 0.701961, 0.341176)
|
||||||
script = ExtResource("8_lmtjd")
|
|
||||||
CapsuleDefaultHeight = 1.7
|
[node name="SlideCollider" type="CollisionShape3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.45, 0)
|
||||||
|
shape = SubResource("SphereShape3D_6lejt")
|
||||||
|
disabled = true
|
||||||
|
debug_color = Color(0, 0.6, 0.701961, 0.341176)
|
||||||
|
|
||||||
[node name="HeadSystem" parent="." instance=ExtResource("11_rxwoh")]
|
[node name="HeadSystem" parent="." instance=ExtResource("11_rxwoh")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.6, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.6, 0)
|
||||||
CameraInclineAcceleration = 20.0
|
CameraInclineAcceleration = 20.0
|
||||||
GroundedCameraIncline = 3.0
|
GroundedCameraIncline = 3.0
|
||||||
|
SlidingJitterAmplitude = 0.2
|
||||||
|
|
||||||
[node name="MantleSystem" parent="HeadSystem" instance=ExtResource("8_qu4wy")]
|
[node name="MantleSystem" parent="HeadSystem" instance=ExtResource("8_qu4wy")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.6, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.6, 0)
|
||||||
@@ -147,9 +170,11 @@ script = ExtResource("7_bmt5a")
|
|||||||
[node name="StairsAheadRayCast3D" type="RayCast3D" parent="."]
|
[node name="StairsAheadRayCast3D" type="RayCast3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, -0.828)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, -0.828)
|
||||||
target_position = Vector3(0, -0.55, 0)
|
target_position = Vector3(0, -0.55, 0)
|
||||||
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="StairsBelowRayCast3D" type="RayCast3D" parent="."]
|
[node name="StairsBelowRayCast3D" type="RayCast3D" parent="."]
|
||||||
target_position = Vector3(0, -0.75, 0)
|
target_position = Vector3(0, -0.75, 0)
|
||||||
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="Bobbing" type="Node3D" parent="."]
|
[node name="Bobbing" type="Node3D" parent="."]
|
||||||
script = ExtResource("10_7wk1w")
|
script = ExtResource("10_7wk1w")
|
||||||
@@ -163,18 +188,22 @@ visible = false
|
|||||||
[node name="HeadCollisionDetector0" type="RayCast3D" parent="HeadCollisionDetectors"]
|
[node name="HeadCollisionDetector0" type="RayCast3D" parent="HeadCollisionDetectors"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.4, -0.210707)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.4, -0.210707)
|
||||||
target_position = Vector3(0, 1, 0)
|
target_position = Vector3(0, 1, 0)
|
||||||
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="HeadCollisionDetector1" type="RayCast3D" parent="HeadCollisionDetectors"]
|
[node name="HeadCollisionDetector1" type="RayCast3D" parent="HeadCollisionDetectors"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.4, 0.23061)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.4, 0.23061)
|
||||||
target_position = Vector3(0, 1, 0)
|
target_position = Vector3(0, 1, 0)
|
||||||
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="HeadCollisionDetector2" type="RayCast3D" parent="HeadCollisionDetectors"]
|
[node name="HeadCollisionDetector2" type="RayCast3D" parent="HeadCollisionDetectors"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.296, 1.4, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.296, 1.4, 0)
|
||||||
target_position = Vector3(0, 1, 0)
|
target_position = Vector3(0, 1, 0)
|
||||||
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="HeadCollisionDetector3" type="RayCast3D" parent="HeadCollisionDetectors"]
|
[node name="HeadCollisionDetector3" type="RayCast3D" parent="HeadCollisionDetectors"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.296, 1.4, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.296, 1.4, 0)
|
||||||
target_position = Vector3(0, 1, 0)
|
target_position = Vector3(0, 1, 0)
|
||||||
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="TweenQueueSystem" parent="." instance=ExtResource("22_rpwev")]
|
[node name="TweenQueueSystem" parent="." instance=ExtResource("22_rpwev")]
|
||||||
|
|
||||||
@@ -183,39 +212,39 @@ script = ExtResource("27_n7qhm")
|
|||||||
|
|
||||||
[node name="back" type="RayCast3D" parent="WallHugSystem"]
|
[node name="back" type="RayCast3D" parent="WallHugSystem"]
|
||||||
target_position = Vector3(0, 0, 1)
|
target_position = Vector3(0, 0, 1)
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="back2" type="RayCast3D" parent="WallHugSystem"]
|
[node name="back2" type="RayCast3D" parent="WallHugSystem"]
|
||||||
transform = Transform3D(0.70710677, 0, 0.70710677, 0, 1, 0, -0.70710677, 0, 0.70710677, 0, 0, 0)
|
transform = Transform3D(0.70710677, 0, 0.70710677, 0, 1, 0, -0.70710677, 0, 0.70710677, 0, 0, 0)
|
||||||
target_position = Vector3(0, 0, 1)
|
target_position = Vector3(0, 0, 1)
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="front" type="RayCast3D" parent="WallHugSystem"]
|
[node name="front" type="RayCast3D" parent="WallHugSystem"]
|
||||||
target_position = Vector3(0, 0, -1)
|
target_position = Vector3(0, 0, -1)
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="front2" type="RayCast3D" parent="WallHugSystem"]
|
[node name="front2" type="RayCast3D" parent="WallHugSystem"]
|
||||||
transform = Transform3D(0.70710677, 0, 0.70710677, 0, 1, 0, -0.70710677, 0, 0.70710677, 0, 0, 0)
|
transform = Transform3D(0.70710677, 0, 0.70710677, 0, 1, 0, -0.70710677, 0, 0.70710677, 0, 0, 0)
|
||||||
target_position = Vector3(0, 0, -1)
|
target_position = Vector3(0, 0, -1)
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="right" type="RayCast3D" parent="WallHugSystem"]
|
[node name="right" type="RayCast3D" parent="WallHugSystem"]
|
||||||
target_position = Vector3(1, 0, 0)
|
target_position = Vector3(1, 0, 0)
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="right2" type="RayCast3D" parent="WallHugSystem"]
|
[node name="right2" type="RayCast3D" parent="WallHugSystem"]
|
||||||
transform = Transform3D(0.70710677, 0, 0.70710677, 0, 1, 0, -0.70710677, 0, 0.70710677, 0, 0, 0)
|
transform = Transform3D(0.70710677, 0, 0.70710677, 0, 1, 0, -0.70710677, 0, 0.70710677, 0, 0, 0)
|
||||||
target_position = Vector3(1, 0, 0)
|
target_position = Vector3(1, 0, 0)
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="left" type="RayCast3D" parent="WallHugSystem"]
|
[node name="left" type="RayCast3D" parent="WallHugSystem"]
|
||||||
target_position = Vector3(-1, 0, 0)
|
target_position = Vector3(-1, 0, 0)
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="left2" type="RayCast3D" parent="WallHugSystem"]
|
[node name="left2" type="RayCast3D" parent="WallHugSystem"]
|
||||||
transform = Transform3D(0.70710677, 0, 0.70710677, 0, 1, 0, -0.70710677, 0, 0.70710677, 0, 0, 0)
|
transform = Transform3D(0.70710677, 0, 0.70710677, 0, 1, 0, -0.70710677, 0, 0.70710677, 0, 0, 0)
|
||||||
target_position = Vector3(-1, 0, 0)
|
target_position = Vector3(-1, 0, 0)
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="DashSystem" parent="." instance=ExtResource("18_q5h8a")]
|
[node name="DashSystem" parent="." instance=ExtResource("18_q5h8a")]
|
||||||
DashSpeed = 0.2
|
DashSpeed = 0.2
|
||||||
@@ -237,8 +266,18 @@ mesh = SubResource("CylinderMesh_nodcl")
|
|||||||
|
|
||||||
[node name="GroundDetector" type="ShapeCast3D" parent="."]
|
[node name="GroundDetector" type="ShapeCast3D" parent="."]
|
||||||
shape = SubResource("CapsuleShape3D_6lejt")
|
shape = SubResource("CapsuleShape3D_6lejt")
|
||||||
target_position = Vector3(0, -0.5, 0)
|
collision_mask = 256
|
||||||
collision_mask = 2
|
|
||||||
|
[node name="CeilingDetector" type="ShapeCast3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, 0)
|
||||||
|
enabled = false
|
||||||
|
shape = SubResource("SphereShape3D_nob5r")
|
||||||
|
target_position = Vector3(0, 0.4, 0)
|
||||||
|
collision_mask = 256
|
||||||
|
|
||||||
|
[node name="DirectGroundDetector" type="RayCast3D" parent="."]
|
||||||
|
target_position = Vector3(0, -2, 0)
|
||||||
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="DashCooldown" type="Timer" parent="."]
|
[node name="DashCooldown" type="Timer" parent="."]
|
||||||
wait_time = 0.8
|
wait_time = 0.8
|
||||||
@@ -480,6 +519,33 @@ to = NodePath("../OnWall/Hanging")
|
|||||||
event = &"to_planted"
|
event = &"to_planted"
|
||||||
delay_in_seconds = "0.0"
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
|
[node name="Grounded" type="Node" parent="StateChart/Root/Movement"]
|
||||||
|
script = ExtResource("27_34snm")
|
||||||
|
|
||||||
|
[node name="OnDash" type="Node" parent="StateChart/Root/Movement/Grounded"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../Dashing/Dash")
|
||||||
|
event = &"dash"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
|
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/Grounded"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../Jump/SimpleJump")
|
||||||
|
event = &"jump"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
|
[node name="OnAirborne" type="Node" parent="StateChart/Root/Movement/Grounded"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../Airborne/CoyoteEnabled")
|
||||||
|
event = &"start_falling"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
|
[node name="OnSlide" type="Node" parent="StateChart/Root/Movement/Grounded"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../Sliding/GroundSlide")
|
||||||
|
event = &"slide"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="Mantling" type="Node" parent="StateChart/Root/Movement"]
|
[node name="Mantling" type="Node" parent="StateChart/Root/Movement"]
|
||||||
script = ExtResource("27_34snm")
|
script = ExtResource("27_34snm")
|
||||||
|
|
||||||
@@ -495,10 +561,25 @@ to = NodePath("../../OnWall/Hugging")
|
|||||||
event = &"on_wall"
|
event = &"on_wall"
|
||||||
delay_in_seconds = "0.0"
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
|
[node name="Slamming" type="Node" parent="StateChart/Root/Movement"]
|
||||||
|
script = ExtResource("27_34snm")
|
||||||
|
|
||||||
|
[node name="OnSlamEnded" type="Node" parent="StateChart/Root/Movement/Slamming"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../Grounded")
|
||||||
|
event = &"grounded"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="Jump" type="Node" parent="StateChart/Root/Movement"]
|
[node name="Jump" type="Node" parent="StateChart/Root/Movement"]
|
||||||
script = ExtResource("26_infe6")
|
script = ExtResource("26_infe6")
|
||||||
initial_state = NodePath("SimpleJump")
|
initial_state = NodePath("SimpleJump")
|
||||||
|
|
||||||
|
[node name="OnDash" type="Node" parent="StateChart/Root/Movement/Jump"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../Dashing/Dash")
|
||||||
|
event = &"dash"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="OnMantle" type="Node" parent="StateChart/Root/Movement/Jump"]
|
[node name="OnMantle" type="Node" parent="StateChart/Root/Movement/Jump"]
|
||||||
script = ExtResource("28_n7qhm")
|
script = ExtResource("28_n7qhm")
|
||||||
to = NodePath("../../Mantling")
|
to = NodePath("../../Mantling")
|
||||||
@@ -514,10 +595,10 @@ to = NodePath("../../../Airborne/DoubleJumpEnabled")
|
|||||||
event = &"jump_ended"
|
event = &"jump_ended"
|
||||||
delay_in_seconds = "0.0"
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="OnMegajump" type="Node" parent="StateChart/Root/Movement/Jump/SimpleJump"]
|
[node name="OnSlide" type="Node" parent="StateChart/Root/Movement/Jump/SimpleJump"]
|
||||||
script = ExtResource("28_n7qhm")
|
script = ExtResource("28_n7qhm")
|
||||||
to = NodePath("../../MegaJump")
|
to = NodePath("../../../Sliding/AirGlideDoubleJumpEnabled")
|
||||||
event = &"megajump"
|
event = &"slide"
|
||||||
delay_in_seconds = "0.0"
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="DoubleJump" type="Node" parent="StateChart/Root/Movement/Jump"]
|
[node name="DoubleJump" type="Node" parent="StateChart/Root/Movement/Jump"]
|
||||||
@@ -529,19 +610,22 @@ to = NodePath("../../../Airborne/Falling")
|
|||||||
event = &"jump_ended"
|
event = &"jump_ended"
|
||||||
delay_in_seconds = "0.0"
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="OnMegajump" type="Node" parent="StateChart/Root/Movement/Jump/DoubleJump"]
|
[node name="OnSlide" type="Node" parent="StateChart/Root/Movement/Jump/DoubleJump"]
|
||||||
script = ExtResource("28_n7qhm")
|
script = ExtResource("28_n7qhm")
|
||||||
to = NodePath("../../MegaJump")
|
to = NodePath("../../../Sliding/AirGlide")
|
||||||
event = &"megajump"
|
event = &"slide"
|
||||||
delay_in_seconds = "0.0"
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="MegaJump" type="Node" parent="StateChart/Root/Movement/Jump"]
|
|
||||||
script = ExtResource("27_34snm")
|
|
||||||
|
|
||||||
[node name="Dashing" type="Node" parent="StateChart/Root/Movement"]
|
[node name="Dashing" type="Node" parent="StateChart/Root/Movement"]
|
||||||
script = ExtResource("26_infe6")
|
script = ExtResource("26_infe6")
|
||||||
initial_state = NodePath("Dash")
|
initial_state = NodePath("Dash")
|
||||||
|
|
||||||
|
[node name="OnDashEndedGrounded" type="Node" parent="StateChart/Root/Movement/Dashing"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../Grounded")
|
||||||
|
event = &"grounded"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="OnDashEnded" type="Node" parent="StateChart/Root/Movement/Dashing"]
|
[node name="OnDashEnded" type="Node" parent="StateChart/Root/Movement/Dashing"]
|
||||||
script = ExtResource("28_n7qhm")
|
script = ExtResource("28_n7qhm")
|
||||||
to = NodePath("../../Airborne/Reset")
|
to = NodePath("../../Airborne/Reset")
|
||||||
@@ -566,33 +650,112 @@ script = ExtResource("27_34snm")
|
|||||||
[node name="ToWeaponDash" type="Node" parent="StateChart/Root/Movement/Dashing"]
|
[node name="ToWeaponDash" type="Node" parent="StateChart/Root/Movement/Dashing"]
|
||||||
script = ExtResource("27_34snm")
|
script = ExtResource("27_34snm")
|
||||||
|
|
||||||
[node name="Grounded" type="Node" parent="StateChart/Root/Movement"]
|
[node name="Sliding" type="Node" parent="StateChart/Root/Movement"]
|
||||||
script = ExtResource("27_34snm")
|
script = ExtResource("26_infe6")
|
||||||
|
initial_state = NodePath("GroundSlide")
|
||||||
|
|
||||||
[node name="OnDash" type="Node" parent="StateChart/Root/Movement/Grounded"]
|
[node name="OnDash" type="Node" parent="StateChart/Root/Movement/Sliding"]
|
||||||
script = ExtResource("28_n7qhm")
|
script = ExtResource("28_n7qhm")
|
||||||
to = NodePath("../../Dashing/Dash")
|
to = NodePath("../../Dashing/Dash")
|
||||||
event = &"dash"
|
event = &"actually_no_dash"
|
||||||
delay_in_seconds = "0.0"
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/Grounded"]
|
[node name="OnMantle" type="Node" parent="StateChart/Root/Movement/Sliding"]
|
||||||
script = ExtResource("28_n7qhm")
|
script = ExtResource("28_n7qhm")
|
||||||
to = NodePath("../../Jump/SimpleJump")
|
to = NodePath("../../Mantling")
|
||||||
|
event = &"mantle"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
|
[node name="GroundSlide" type="Node" parent="StateChart/Root/Movement/Sliding"]
|
||||||
|
script = ExtResource("27_34snm")
|
||||||
|
|
||||||
|
[node name="OnSlideReleased" type="Node" parent="StateChart/Root/Movement/Sliding/GroundSlide"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../../Grounded")
|
||||||
|
event = &"slide_released"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
|
[node name="OnAirborne" type="Node" parent="StateChart/Root/Movement/Sliding/GroundSlide"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../AirGlideDoubleJumpEnabled")
|
||||||
|
event = &"start_falling"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
|
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/Sliding/GroundSlide"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../../Jump/SimpleJump")
|
||||||
event = &"jump"
|
event = &"jump"
|
||||||
delay_in_seconds = "0.0"
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="OnMegajump" type="Node" parent="StateChart/Root/Movement/Grounded"]
|
[node name="OnCancel" type="Node" parent="StateChart/Root/Movement/Sliding/GroundSlide"]
|
||||||
script = ExtResource("28_n7qhm")
|
script = ExtResource("28_n7qhm")
|
||||||
to = NodePath("../../Jump/MegaJump")
|
to = NodePath("../../SlideCanceled")
|
||||||
event = &"megajump"
|
event = &"slide_canceled"
|
||||||
delay_in_seconds = "0.0"
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="OnAirborne" type="Node" parent="StateChart/Root/Movement/Grounded"]
|
[node name="AirGlideDoubleJumpEnabled" type="Node" parent="StateChart/Root/Movement/Sliding"]
|
||||||
|
script = ExtResource("27_34snm")
|
||||||
|
|
||||||
|
[node name="OnSlideReleased" type="Node" parent="StateChart/Root/Movement/Sliding/AirGlideDoubleJumpEnabled"]
|
||||||
script = ExtResource("28_n7qhm")
|
script = ExtResource("28_n7qhm")
|
||||||
to = NodePath("../../Airborne/CoyoteEnabled")
|
to = NodePath("../../../Airborne/Reset")
|
||||||
|
event = &"slide_released"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
|
[node name="OnGrounded" type="Node" parent="StateChart/Root/Movement/Sliding/AirGlideDoubleJumpEnabled"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../GroundSlide")
|
||||||
|
event = &"grounded"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
|
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/Sliding/AirGlideDoubleJumpEnabled"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../../Jump/DoubleJump")
|
||||||
|
event = &"jump"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
|
[node name="AirGlide" type="Node" parent="StateChart/Root/Movement/Sliding"]
|
||||||
|
script = ExtResource("27_34snm")
|
||||||
|
|
||||||
|
[node name="OnSlideReleased" type="Node" parent="StateChart/Root/Movement/Sliding/AirGlide"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../../Airborne/Reset")
|
||||||
|
event = &"slide_released"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
|
[node name="OnGrounded" type="Node" parent="StateChart/Root/Movement/Sliding/AirGlide"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../GroundSlide")
|
||||||
|
event = &"grounded"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
|
[node name="SlideCanceled" type="Node" parent="StateChart/Root/Movement/Sliding"]
|
||||||
|
script = ExtResource("27_34snm")
|
||||||
|
|
||||||
|
[node name="OnAirborne" type="Node" parent="StateChart/Root/Movement/Sliding/SlideCanceled"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../../Airborne/CoyoteEnabled")
|
||||||
event = &"start_falling"
|
event = &"start_falling"
|
||||||
delay_in_seconds = "0.0"
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
|
[node name="OnDash" type="Node" parent="StateChart/Root/Movement/Sliding/SlideCanceled"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../../Dashing/Dash")
|
||||||
|
event = &"dash"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
|
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/Sliding/SlideCanceled"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../../Jump/SimpleJump")
|
||||||
|
event = &"jump"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
|
[node name="OnSlideReleased" type="Node" parent="StateChart/Root/Movement/Sliding/SlideCanceled"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../../Grounded")
|
||||||
|
event = &"slide_released"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="Airborne" type="Node" parent="StateChart/Root/Movement"]
|
[node name="Airborne" type="Node" parent="StateChart/Root/Movement"]
|
||||||
script = ExtResource("26_infe6")
|
script = ExtResource("26_infe6")
|
||||||
initial_state = NodePath("CoyoteEnabled")
|
initial_state = NodePath("CoyoteEnabled")
|
||||||
@@ -619,13 +782,19 @@ to = NodePath("../../Grounded")
|
|||||||
event = &"grounded"
|
event = &"grounded"
|
||||||
delay_in_seconds = "0.0"
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
|
[node name="OnSlam" type="Node" parent="StateChart/Root/Movement/Airborne"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../Slamming")
|
||||||
|
event = &"slam"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="CoyoteEnabled" type="Node" parent="StateChart/Root/Movement/Airborne"]
|
[node name="CoyoteEnabled" type="Node" parent="StateChart/Root/Movement/Airborne"]
|
||||||
script = ExtResource("27_34snm")
|
script = ExtResource("27_34snm")
|
||||||
|
|
||||||
[node name="OnMegajump" type="Node" parent="StateChart/Root/Movement/Airborne/CoyoteEnabled"]
|
[node name="OnSlide" type="Node" parent="StateChart/Root/Movement/Airborne/CoyoteEnabled"]
|
||||||
script = ExtResource("28_n7qhm")
|
script = ExtResource("28_n7qhm")
|
||||||
to = NodePath("../../../Jump/MegaJump")
|
to = NodePath("../../../Sliding/AirGlideDoubleJumpEnabled")
|
||||||
event = &"megajump"
|
event = &"slide"
|
||||||
delay_in_seconds = "0.0"
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/Airborne/CoyoteEnabled"]
|
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/Airborne/CoyoteEnabled"]
|
||||||
@@ -643,15 +812,16 @@ delay_in_seconds = "0.0"
|
|||||||
[node name="DoubleJumpEnabled" type="Node" parent="StateChart/Root/Movement/Airborne"]
|
[node name="DoubleJumpEnabled" type="Node" parent="StateChart/Root/Movement/Airborne"]
|
||||||
script = ExtResource("27_34snm")
|
script = ExtResource("27_34snm")
|
||||||
|
|
||||||
[node name="OnWallHug" type="Node" parent="StateChart/Root/Movement/Airborne/DoubleJumpEnabled"]
|
[node name="OnSlide" type="Node" parent="StateChart/Root/Movement/Airborne/DoubleJumpEnabled"]
|
||||||
script = ExtResource("28_n7qhm")
|
script = ExtResource("28_n7qhm")
|
||||||
event = &"wall_hug"
|
to = NodePath("../../../Sliding/AirGlideDoubleJumpEnabled")
|
||||||
|
event = &"slide"
|
||||||
delay_in_seconds = "0.0"
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="OnMegajump" type="Node" parent="StateChart/Root/Movement/Airborne/DoubleJumpEnabled"]
|
[node name="OnWallHug" type="Node" parent="StateChart/Root/Movement/Airborne/DoubleJumpEnabled"]
|
||||||
script = ExtResource("28_n7qhm")
|
script = ExtResource("28_n7qhm")
|
||||||
to = NodePath("../../../Jump/MegaJump")
|
to = NodePath("../../../OnWall/Hugging")
|
||||||
event = &"megajump"
|
event = &"wall_hug"
|
||||||
delay_in_seconds = "0.0"
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/Airborne/DoubleJumpEnabled"]
|
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/Airborne/DoubleJumpEnabled"]
|
||||||
@@ -663,6 +833,12 @@ delay_in_seconds = "0.0"
|
|||||||
[node name="Falling" type="Node" parent="StateChart/Root/Movement/Airborne"]
|
[node name="Falling" type="Node" parent="StateChart/Root/Movement/Airborne"]
|
||||||
script = ExtResource("27_34snm")
|
script = ExtResource("27_34snm")
|
||||||
|
|
||||||
|
[node name="OnSlide" type="Node" parent="StateChart/Root/Movement/Airborne/Falling"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../../Sliding/AirGlide")
|
||||||
|
event = &"slide"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="OnWallHug" type="Node" parent="StateChart/Root/Movement/Airborne/Falling"]
|
[node name="OnWallHug" type="Node" parent="StateChart/Root/Movement/Airborne/Falling"]
|
||||||
script = ExtResource("28_n7qhm")
|
script = ExtResource("28_n7qhm")
|
||||||
to = NodePath("../../../OnWall/Hugging")
|
to = NodePath("../../../OnWall/Hugging")
|
||||||
@@ -675,6 +851,12 @@ to = NodePath("../../DoubleJumpEnabled")
|
|||||||
event = &"enable_double_jump"
|
event = &"enable_double_jump"
|
||||||
delay_in_seconds = "0.0"
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
|
[node name="OnWallJump" type="Node" parent="StateChart/Root/Movement/Airborne/Falling"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../../Jump/DoubleJump")
|
||||||
|
event = &"wall_jump"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="OnWall" type="Node" parent="StateChart/Root/Movement"]
|
[node name="OnWall" type="Node" parent="StateChart/Root/Movement"]
|
||||||
script = ExtResource("26_infe6")
|
script = ExtResource("26_infe6")
|
||||||
initial_state = NodePath("Hugging")
|
initial_state = NodePath("Hugging")
|
||||||
@@ -685,12 +867,6 @@ to = NodePath("../../Grounded")
|
|||||||
event = &"grounded"
|
event = &"grounded"
|
||||||
delay_in_seconds = "0.0"
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="OnMegajump" type="Node" parent="StateChart/Root/Movement/OnWall"]
|
|
||||||
script = ExtResource("28_n7qhm")
|
|
||||||
to = NodePath("../../Jump/MegaJump")
|
|
||||||
event = &"megajump"
|
|
||||||
delay_in_seconds = "0.0"
|
|
||||||
|
|
||||||
[node name="OnLeaveWall" type="Node" parent="StateChart/Root/Movement/OnWall"]
|
[node name="OnLeaveWall" type="Node" parent="StateChart/Root/Movement/OnWall"]
|
||||||
script = ExtResource("28_n7qhm")
|
script = ExtResource("28_n7qhm")
|
||||||
to = NodePath("../../Airborne/Reset")
|
to = NodePath("../../Airborne/Reset")
|
||||||
@@ -705,7 +881,7 @@ delay_in_seconds = "0.0"
|
|||||||
|
|
||||||
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/OnWall"]
|
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/OnWall"]
|
||||||
script = ExtResource("28_n7qhm")
|
script = ExtResource("28_n7qhm")
|
||||||
to = NodePath("../../Jump/DoubleJump")
|
to = NodePath("../../Jump/SimpleJump")
|
||||||
event = &"jump"
|
event = &"jump"
|
||||||
delay_in_seconds = "0.0"
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
@@ -752,6 +928,5 @@ delay_in_seconds = "0.0"
|
|||||||
[connection signal="input_rotate_y" from="InputController" to="." method="OnInputRotateY"]
|
[connection signal="input_rotate_y" from="InputController" to="." method="OnInputRotateY"]
|
||||||
[connection signal="input_slam" from="InputController" to="." method="OnInputSlamPressed"]
|
[connection signal="input_slam" from="InputController" to="." method="OnInputSlamPressed"]
|
||||||
[connection signal="input_slide_ended" from="InputController" to="." method="OnInputSlideEnded"]
|
[connection signal="input_slide_ended" from="InputController" to="." method="OnInputSlideEnded"]
|
||||||
[connection signal="input_slide_ongoing" from="InputController" to="." method="OnInputSlideOngoing"]
|
|
||||||
[connection signal="input_slide_started" from="InputController" to="." method="OnInputSlideStarted"]
|
[connection signal="input_slide_started" from="InputController" to="." method="OnInputSlideStarted"]
|
||||||
[connection signal="WallDetected" from="WallHugSystem" to="." method="OnWallDetected"]
|
[connection signal="WallDetected" from="WallHugSystem" to="." method="OnWallDetected"]
|
||||||
|
|||||||
@@ -40,17 +40,13 @@ public partial class CapsuleCollider : CollisionShape3D
|
|||||||
return Mathf.IsEqualApprox(_shape.Height, CapsuleCrouchHeight);
|
return Mathf.IsEqualApprox(_shape.Height, CapsuleCrouchHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Crouch(float delta, float crouchTransitionSpeed)
|
public void Crouch()
|
||||||
{
|
{
|
||||||
_shape.Height -= delta * crouchTransitionSpeed;
|
_shape.Height = CapsuleCrouchHeight;
|
||||||
|
|
||||||
_shape.Height = Mathf.Clamp(_shape.Height, CapsuleCrouchHeight, CapsuleDefaultHeight);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UndoCrouching(float delta, float crouchTransitionSpeed)
|
public void Uncrouch()
|
||||||
{
|
{
|
||||||
_shape.Height += delta * crouchTransitionSpeed;
|
_shape.Height = CapsuleDefaultHeight;
|
||||||
|
|
||||||
_shape.Height = Mathf.Clamp(_shape.Height, CapsuleCrouchHeight, CapsuleDefaultHeight);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -146,6 +146,16 @@ aim_dash={
|
|||||||
|
|
||||||
locale/translations=PackedStringArray("res://addons/maaacks_game_template/base/translations/menus_translations.en.translation", "res://addons/maaacks_game_template/base/translations/menus_translations.fr.translation")
|
locale/translations=PackedStringArray("res://addons/maaacks_game_template/base/translations/menus_translations.en.translation", "res://addons/maaacks_game_template/base/translations/menus_translations.fr.translation")
|
||||||
|
|
||||||
|
[layer_names]
|
||||||
|
|
||||||
|
3d_physics/layer_1="Player"
|
||||||
|
3d_physics/layer_2="2"
|
||||||
|
3d_physics/layer_3="3"
|
||||||
|
3d_physics/layer_4="4"
|
||||||
|
3d_physics/layer_5="enemies"
|
||||||
|
3d_physics/layer_9="terrain"
|
||||||
|
3d_physics/layer_17="weapon"
|
||||||
|
|
||||||
[maaacks_game_template]
|
[maaacks_game_template]
|
||||||
|
|
||||||
disable_update_check=false
|
disable_update_check=false
|
||||||
@@ -154,6 +164,7 @@ copy_path="res://scenes"
|
|||||||
|
|
||||||
[physics]
|
[physics]
|
||||||
|
|
||||||
|
3d/run_on_separate_thread=true
|
||||||
common/physics_jitter_fix=0.0
|
common/physics_jitter_fix=0.0
|
||||||
3d/physics_engine="Jolt Physics"
|
3d/physics_engine="Jolt Physics"
|
||||||
common/physics_interpolation=true
|
common/physics_interpolation=true
|
||||||
|
|||||||
40
scenes/enemies/FirstEnemy.cs
Normal file
40
scenes/enemies/FirstEnemy.cs
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
using Movementtests.player_controller.Scripts;
|
||||||
|
|
||||||
|
public partial class FirstEnemy : CharacterBody3D
|
||||||
|
{
|
||||||
|
[Export]
|
||||||
|
public Node3D Target { get; set; }
|
||||||
|
|
||||||
|
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
||||||
|
public float Speed = 5.0f;
|
||||||
|
|
||||||
|
private RayCast3D _wallInFrontRayCast;
|
||||||
|
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
_wallInFrontRayCast = GetNode<RayCast3D>("WallInFrontRayCast");
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void _PhysicsProcess(double delta)
|
||||||
|
{
|
||||||
|
var target = Target.GlobalPosition;
|
||||||
|
var direction = (target - GlobalPosition).Normalized();
|
||||||
|
|
||||||
|
var targetPlane = new Vector3(target.X, GlobalPosition.Y, target.Z);
|
||||||
|
LookAt(targetPlane);
|
||||||
|
|
||||||
|
var velocity = Velocity;
|
||||||
|
velocity.X = direction.X * Speed;
|
||||||
|
velocity.Z = direction.Z * Speed;
|
||||||
|
|
||||||
|
if (_wallInFrontRayCast.IsColliding())
|
||||||
|
velocity.Y = Speed;
|
||||||
|
else if (!IsOnFloor())
|
||||||
|
velocity += GetGravity() * (float)delta;
|
||||||
|
|
||||||
|
Velocity = velocity;
|
||||||
|
MoveAndSlide();
|
||||||
|
}
|
||||||
|
}
|
||||||
1
scenes/enemies/FirstEnemy.cs.uid
Normal file
1
scenes/enemies/FirstEnemy.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://bn7sc6id7n166
|
||||||
51
scenes/enemies/first_enemy.tscn
Normal file
51
scenes/enemies/first_enemy.tscn
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
[gd_scene load_steps=6 format=3 uid="uid://dxt0e2ugmttqq"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://bn7sc6id7n166" path="res://scenes/enemies/FirstEnemy.cs" id="1_4yfjf"]
|
||||||
|
|
||||||
|
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_62kkh"]
|
||||||
|
|
||||||
|
[sub_resource type="CapsuleMesh" id="CapsuleMesh_3uydm"]
|
||||||
|
|
||||||
|
[sub_resource type="SphereMesh" id="SphereMesh_4yfjf"]
|
||||||
|
radius = 0.05
|
||||||
|
height = 0.1
|
||||||
|
radial_segments = 4
|
||||||
|
rings = 4
|
||||||
|
|
||||||
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_4yfjf"]
|
||||||
|
albedo_color = Color(0.06469653, 0.06469653, 0.06469653, 1)
|
||||||
|
|
||||||
|
[node name="CharacterBody3D" type="CharacterBody3D"]
|
||||||
|
collision_layer = 16
|
||||||
|
collision_mask = 273
|
||||||
|
script = ExtResource("1_4yfjf")
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||||
|
shape = SubResource("CapsuleShape3D_62kkh")
|
||||||
|
|
||||||
|
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||||
|
layers = 33
|
||||||
|
mesh = SubResource("CapsuleMesh_3uydm")
|
||||||
|
|
||||||
|
[node name="MeshInstance3D2" type="MeshInstance3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.2, 1.5, -0.5)
|
||||||
|
layers = 33
|
||||||
|
cast_shadow = 0
|
||||||
|
ignore_occlusion_culling = true
|
||||||
|
mesh = SubResource("SphereMesh_4yfjf")
|
||||||
|
surface_material_override/0 = SubResource("StandardMaterial3D_4yfjf")
|
||||||
|
|
||||||
|
[node name="MeshInstance3D3" type="MeshInstance3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.2, 1.5, -0.5)
|
||||||
|
layers = 33
|
||||||
|
cast_shadow = 0
|
||||||
|
ignore_occlusion_culling = true
|
||||||
|
mesh = SubResource("SphereMesh_4yfjf")
|
||||||
|
surface_material_override/0 = SubResource("StandardMaterial3D_4yfjf")
|
||||||
|
|
||||||
|
[node name="WallInFrontRayCast" type="RayCast3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, 0)
|
||||||
|
target_position = Vector3(0, 0, -1.5)
|
||||||
|
collision_mask = 272
|
||||||
@@ -10,7 +10,6 @@ font_size = 30
|
|||||||
|
|
||||||
[node name="TutoTrigger" type="Area3D"]
|
[node name="TutoTrigger" type="Area3D"]
|
||||||
collision_layer = 0
|
collision_layer = 0
|
||||||
collision_mask = 16
|
|
||||||
script = ExtResource("1_w8mpv")
|
script = ExtResource("1_w8mpv")
|
||||||
|
|
||||||
[node name="Control" type="Control" parent="."]
|
[node name="Control" type="Control" parent="."]
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.6, 0)
|
|||||||
shape = SubResource("SphereShape3D_jngg2")
|
shape = SubResource("SphereShape3D_jngg2")
|
||||||
target_position = Vector3(0, 0, -12)
|
target_position = Vector3(0, 0, -12)
|
||||||
max_results = 1
|
max_results = 1
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
debug_shape_custom_color = Color(0.911631, 0.11884, 0.656218, 1)
|
debug_shape_custom_color = Color(0.911631, 0.11884, 0.656218, 1)
|
||||||
|
|
||||||
[node name="DashCastDrop" type="ShapeCast3D" parent="."]
|
[node name="DashCastDrop" type="ShapeCast3D" parent="."]
|
||||||
@@ -36,7 +36,7 @@ transform = Transform3D(1, 0, 0, 0, -4.371139e-08, 1, 0, -1, -4.371139e-08, 0, 1
|
|||||||
shape = SubResource("SphereShape3D_jngg2")
|
shape = SubResource("SphereShape3D_jngg2")
|
||||||
target_position = Vector3(0, 0, -50)
|
target_position = Vector3(0, 0, -50)
|
||||||
max_results = 1
|
max_results = 1
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
debug_shape_custom_color = Color(0.911631, 0.11884, 0.656218, 1)
|
debug_shape_custom_color = Color(0.911631, 0.11884, 0.656218, 1)
|
||||||
|
|
||||||
[node name="DashTarget" type="MeshInstance3D" parent="."]
|
[node name="DashTarget" type="MeshInstance3D" parent="."]
|
||||||
|
|||||||
@@ -22,12 +22,26 @@ public partial class HeadSystem : Node3D
|
|||||||
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
||||||
public float GroundedCameraIncline { get; set; } = 5f;
|
public float GroundedCameraIncline { get; set; } = 5f;
|
||||||
|
|
||||||
|
[Export(PropertyHint.Range, "0,2,0.1,or_greater")]
|
||||||
|
public float SlidingCameraHeightOffset { get; set; } = 1.0f;
|
||||||
|
|
||||||
|
[Export(PropertyHint.Range, "0,1,0.01,or_greater")]
|
||||||
|
public float SlidingJitterFrequency { get; set; } = 0.01f;
|
||||||
|
|
||||||
|
[Export(PropertyHint.Range, "0,1,0.01,or_greater")]
|
||||||
|
public float SlidingJitterAmplitude { get; set; } = 0.1f;
|
||||||
|
|
||||||
|
private FastNoiseLite _slidingNoise = new FastNoiseLite();
|
||||||
|
|
||||||
public void Init()
|
public void Init()
|
||||||
{
|
{
|
||||||
Input.SetMouseMode(Input.MouseModeEnum.Captured);
|
Input.SetMouseMode(Input.MouseModeEnum.Captured);
|
||||||
_camera = GetNode<Camera3D>("CameraSmooth/Camera3D");
|
_camera = GetNode<Camera3D>("CameraSmooth/Camera3D");
|
||||||
_cameraAnchor = GetNode<Marker3D>("CameraAnchor");
|
_cameraAnchor = GetNode<Marker3D>("CameraAnchor");
|
||||||
_animationPlayer = GetNode<AnimationPlayer>("AnimationPlayer");
|
_animationPlayer = GetNode<AnimationPlayer>("AnimationPlayer");
|
||||||
|
|
||||||
|
_slidingNoise.NoiseType = FastNoiseLite.NoiseTypeEnum.Perlin;
|
||||||
|
_slidingNoise.SetFrequency(SlidingJitterFrequency);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnMantle()
|
public void OnMantle()
|
||||||
@@ -35,7 +49,7 @@ public partial class HeadSystem : Node3D
|
|||||||
_animationPlayer.Play("mantle");
|
_animationPlayer.Play("mantle");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LookAround(double delta, Vector2 lookDir, Vector3 playerVelocity, Vector3? wallContactPoint = null, float sensitivitMultiplier = 1f)
|
public void LookAround(double delta, Vector2 lookDir, Vector3 playerInput, Vector3 playerVelocity, Vector3? wallContactPoint = null, float sensitivitMultiplier = 1f, bool isSliding = false)
|
||||||
{
|
{
|
||||||
// Horizontal movement of head
|
// Horizontal movement of head
|
||||||
float angleForHorizontalRotation = lookDir.X * LookSensitivity * sensitivitMultiplier;
|
float angleForHorizontalRotation = lookDir.X * LookSensitivity * sensitivitMultiplier;
|
||||||
@@ -46,8 +60,9 @@ public partial class HeadSystem : Node3D
|
|||||||
currentCameraRotation.X += Convert.ToSingle(lookDir.Y * LookSensitivity * sensitivitMultiplier);
|
currentCameraRotation.X += Convert.ToSingle(lookDir.Y * LookSensitivity * sensitivitMultiplier);
|
||||||
currentCameraRotation.X = Mathf.Clamp(currentCameraRotation.X, Mathf.DegToRad(-90f), Mathf.DegToRad(90f));
|
currentCameraRotation.X = Mathf.Clamp(currentCameraRotation.X, Mathf.DegToRad(-90f), Mathf.DegToRad(90f));
|
||||||
|
|
||||||
|
// Camera incline on Wall and more
|
||||||
var isWallRunning = wallContactPoint.HasValue && wallContactPoint.Value.Length() > Mathf.Epsilon;
|
var isWallRunning = wallContactPoint.HasValue && wallContactPoint.Value.Length() > Mathf.Epsilon;
|
||||||
var cameraIncline = 0f;
|
float cameraIncline;
|
||||||
if (isWallRunning)
|
if (isWallRunning)
|
||||||
{
|
{
|
||||||
var directionToWall = (wallContactPoint.Value - GlobalPosition).Normalized();
|
var directionToWall = (wallContactPoint.Value - GlobalPosition).Normalized();
|
||||||
@@ -56,11 +71,23 @@ public partial class HeadSystem : Node3D
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var cameraInclineFactor = ComputeCameraInclineFactor(playerVelocity);
|
var cameraInclineFactor = ComputeCameraInclineFactor(playerInput);
|
||||||
cameraIncline = Mathf.DegToRad(GroundedCameraIncline * cameraInclineFactor * -1.0f);
|
cameraIncline = Mathf.DegToRad(GroundedCameraIncline * cameraInclineFactor * -1.0f);
|
||||||
}
|
}
|
||||||
currentCameraRotation.Z = (float) Mathf.Lerp(currentCameraRotation.Z, cameraIncline, delta * CameraInclineAcceleration);
|
currentCameraRotation.Z = (float) Mathf.Lerp(currentCameraRotation.Z, cameraIncline, delta * CameraInclineAcceleration);
|
||||||
_cameraAnchor.Rotation = currentCameraRotation;
|
_cameraAnchor.Rotation = currentCameraRotation;
|
||||||
|
|
||||||
|
if (isSliding)
|
||||||
|
{
|
||||||
|
_cameraAnchor.Position = Vector3.Down*SlidingCameraHeightOffset;
|
||||||
|
float noise1D = _slidingNoise.GetNoise1D(Time.GetTicksMsec());
|
||||||
|
float noiseAmplitude = SlidingJitterAmplitude*Mathf.Clamp(playerVelocity.Length(), 0f, 1f);
|
||||||
|
_cameraAnchor.Position += Vector3.Up*noise1D*noiseAmplitude;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_cameraAnchor.Position = Vector3.Zero;
|
||||||
|
}
|
||||||
|
|
||||||
_camera.GlobalTransform = _cameraAnchor.GetGlobalTransformInterpolated();
|
_camera.GlobalTransform = _cameraAnchor.GetGlobalTransformInterpolated();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,10 +69,6 @@ transform = Transform3D(1, 0, 0, 0, 0.99999994, 0, 0, 0, 0.99999994, 0, 0, 0)
|
|||||||
current = true
|
current = true
|
||||||
fov = 90.0
|
fov = 90.0
|
||||||
|
|
||||||
[node name="RayCast3D" type="RayCast3D" parent="CameraSmooth/Camera3D"]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, -0.64723)
|
|
||||||
visible = false
|
|
||||||
|
|
||||||
[node name="CameraAnchor" type="Marker3D" parent="."]
|
[node name="CameraAnchor" type="Marker3D" parent="."]
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_resource type="Resource" script_class="GUIDEMappingContext" load_steps=157 format=3 uid="uid://bl5crtu1gkrtr"]
|
[gd_resource type="Resource" script_class="GUIDEMappingContext" load_steps=161 format=3 uid="uid://bl5crtu1gkrtr"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cpplm41b5bt6m" path="res://addons/guide/guide_action_mapping.gd" id="1_qmhk6"]
|
[ext_resource type="Script" uid="uid://cpplm41b5bt6m" path="res://addons/guide/guide_action_mapping.gd" id="1_qmhk6"]
|
||||||
[ext_resource type="Resource" uid="uid://htqvokm8mufq" path="res://systems/inputs/base_mode/move.tres" id="2_g6bbx"]
|
[ext_resource type="Resource" uid="uid://htqvokm8mufq" path="res://systems/inputs/base_mode/move.tres" id="2_g6bbx"]
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
[ext_resource type="Resource" uid="uid://d2r0ur8k3cuu3" path="res://systems/inputs/base_mode/dash.tres" id="23_g6bbx"]
|
[ext_resource type="Resource" uid="uid://d2r0ur8k3cuu3" path="res://systems/inputs/base_mode/dash.tres" id="23_g6bbx"]
|
||||||
[ext_resource type="Script" uid="uid://dsa1dnifd6w32" path="res://addons/guide/guide_mapping_context.gd" id="23_llfhp"]
|
[ext_resource type="Script" uid="uid://dsa1dnifd6w32" path="res://addons/guide/guide_mapping_context.gd" id="23_llfhp"]
|
||||||
[ext_resource type="Resource" uid="uid://bbce5wfwxpns1" path="res://systems/inputs/base_mode/slide_pressed.tres" id="23_rvpjj"]
|
[ext_resource type="Resource" uid="uid://bbce5wfwxpns1" path="res://systems/inputs/base_mode/slide_pressed.tres" id="23_rvpjj"]
|
||||||
[ext_resource type="Resource" uid="uid://b334rau1yxmm7" path="res://systems/inputs/base_mode/slide.tres" id="25_s8kjn"]
|
[ext_resource type="Resource" uid="uid://b334rau1yxmm7" path="res://systems/inputs/base_mode/slide_released.tres" id="25_rvpjj"]
|
||||||
[ext_resource type="Resource" uid="uid://55b0dsvioj08" path="res://systems/inputs/base_mode/jump_pressed.tres" id="25_si4d4"]
|
[ext_resource type="Resource" uid="uid://55b0dsvioj08" path="res://systems/inputs/base_mode/jump_pressed.tres" id="25_si4d4"]
|
||||||
[ext_resource type="Resource" uid="uid://dgluj0ql5vth7" path="res://systems/inputs/base_mode/pause.tres" id="29_q86qg"]
|
[ext_resource type="Resource" uid="uid://dgluj0ql5vth7" path="res://systems/inputs/base_mode/pause.tres" id="29_q86qg"]
|
||||||
[ext_resource type="Script" uid="uid://cw71o87tvdx3q" path="res://addons/guide/inputs/guide_input_key.gd" id="30_cvxqo"]
|
[ext_resource type="Script" uid="uid://cw71o87tvdx3q" path="res://addons/guide/inputs/guide_input_key.gd" id="30_cvxqo"]
|
||||||
@@ -234,7 +234,7 @@ script = ExtResource("10_cvxqo")
|
|||||||
axis = 5
|
axis = 5
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_st2ej"]
|
[sub_resource type="Resource" id="Resource_st2ej"]
|
||||||
script = ExtResource("15_fykw6")
|
script = ExtResource("15_g6bbx")
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_s8kjn"]
|
[sub_resource type="Resource" id="Resource_s8kjn"]
|
||||||
script = ExtResource("3_yp12v")
|
script = ExtResource("3_yp12v")
|
||||||
@@ -246,10 +246,13 @@ metadata/_guide_triggers_collapsed = false
|
|||||||
script = ExtResource("30_cvxqo")
|
script = ExtResource("30_cvxqo")
|
||||||
key = 4194326
|
key = 4194326
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_8ifoc"]
|
||||||
|
script = ExtResource("15_g6bbx")
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_imjft"]
|
[sub_resource type="Resource" id="Resource_imjft"]
|
||||||
script = ExtResource("3_yp12v")
|
script = ExtResource("3_yp12v")
|
||||||
input = SubResource("Resource_wcvib")
|
input = SubResource("Resource_wcvib")
|
||||||
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_st2ej")])
|
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_8ifoc")])
|
||||||
metadata/_guide_triggers_collapsed = false
|
metadata/_guide_triggers_collapsed = false
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_vibkn"]
|
[sub_resource type="Resource" id="Resource_vibkn"]
|
||||||
@@ -261,21 +264,29 @@ input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_s8kjn"), S
|
|||||||
script = ExtResource("10_cvxqo")
|
script = ExtResource("10_cvxqo")
|
||||||
axis = 5
|
axis = 5
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_rvpjj"]
|
||||||
|
script = ExtResource("17_s8kjn")
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_818lq"]
|
[sub_resource type="Resource" id="Resource_818lq"]
|
||||||
script = ExtResource("3_yp12v")
|
script = ExtResource("3_yp12v")
|
||||||
input = SubResource("Resource_f3pn5")
|
input = SubResource("Resource_f3pn5")
|
||||||
|
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_rvpjj")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_qksfw"]
|
[sub_resource type="Resource" id="Resource_qksfw"]
|
||||||
script = ExtResource("30_cvxqo")
|
script = ExtResource("30_cvxqo")
|
||||||
key = 4194326
|
key = 4194326
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_bhf7o"]
|
||||||
|
script = ExtResource("17_s8kjn")
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_woy8j"]
|
[sub_resource type="Resource" id="Resource_woy8j"]
|
||||||
script = ExtResource("3_yp12v")
|
script = ExtResource("3_yp12v")
|
||||||
input = SubResource("Resource_qksfw")
|
input = SubResource("Resource_qksfw")
|
||||||
|
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_bhf7o")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_2hs2y"]
|
[sub_resource type="Resource" id="Resource_2hs2y"]
|
||||||
script = ExtResource("1_qmhk6")
|
script = ExtResource("1_qmhk6")
|
||||||
action = ExtResource("25_s8kjn")
|
action = ExtResource("25_rvpjj")
|
||||||
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_818lq"), SubResource("Resource_woy8j")])
|
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_818lq"), SubResource("Resource_woy8j")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_1fkas"]
|
[sub_resource type="Resource" id="Resource_1fkas"]
|
||||||
@@ -419,21 +430,25 @@ metadata/_guide_input_mappings_collapsed = false
|
|||||||
script = ExtResource("19_qkgmj")
|
script = ExtResource("19_qkgmj")
|
||||||
button = 2
|
button = 2
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_kxb2c"]
|
[sub_resource type="Resource" id="Resource_06f1o"]
|
||||||
script = ExtResource("15_fykw6")
|
script = ExtResource("15_g6bbx")
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_v2ywt"]
|
[sub_resource type="Resource" id="Resource_v2ywt"]
|
||||||
script = ExtResource("3_yp12v")
|
script = ExtResource("3_yp12v")
|
||||||
input = SubResource("Resource_o5yys")
|
input = SubResource("Resource_o5yys")
|
||||||
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_kxb2c")])
|
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_06f1o")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_qpgnj"]
|
[sub_resource type="Resource" id="Resource_qpgnj"]
|
||||||
script = ExtResource("30_cvxqo")
|
script = ExtResource("30_cvxqo")
|
||||||
key = 69
|
key = 69
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_g5tel"]
|
||||||
|
script = ExtResource("15_g6bbx")
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_s6d3g"]
|
[sub_resource type="Resource" id="Resource_s6d3g"]
|
||||||
script = ExtResource("3_yp12v")
|
script = ExtResource("3_yp12v")
|
||||||
input = SubResource("Resource_qpgnj")
|
input = SubResource("Resource_qpgnj")
|
||||||
|
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_g5tel")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_vtk18"]
|
[sub_resource type="Resource" id="Resource_vtk18"]
|
||||||
script = ExtResource("1_qmhk6")
|
script = ExtResource("1_qmhk6")
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ class_name InputController
|
|||||||
@export var jump:GUIDEAction
|
@export var jump:GUIDEAction
|
||||||
@export var jump_pressed:GUIDEAction
|
@export var jump_pressed:GUIDEAction
|
||||||
@export_subgroup("Slide")
|
@export_subgroup("Slide")
|
||||||
@export var slide:GUIDEAction
|
|
||||||
@export var slide_pressed:GUIDEAction
|
@export var slide_pressed:GUIDEAction
|
||||||
|
@export var slide_released:GUIDEAction
|
||||||
@export_subgroup("Other")
|
@export_subgroup("Other")
|
||||||
@export var hit:GUIDEAction
|
@export var hit:GUIDEAction
|
||||||
@export var parry:GUIDEAction
|
@export var parry:GUIDEAction
|
||||||
@@ -48,7 +48,6 @@ signal input_aim_down
|
|||||||
signal input_aim_released
|
signal input_aim_released
|
||||||
|
|
||||||
signal input_slide_started
|
signal input_slide_started
|
||||||
signal input_slide_ongoing
|
|
||||||
signal input_slide_ended
|
signal input_slide_ended
|
||||||
|
|
||||||
signal input_hit
|
signal input_hit
|
||||||
@@ -68,8 +67,7 @@ func _ready() -> void:
|
|||||||
jump.completed.connect(on_input_jump_ended)
|
jump.completed.connect(on_input_jump_ended)
|
||||||
|
|
||||||
slide_pressed.triggered.connect(on_input_slide_started)
|
slide_pressed.triggered.connect(on_input_slide_started)
|
||||||
slide.triggered.connect(on_input_slide_ongoing)
|
slide_released.triggered.connect(on_input_slide_ended)
|
||||||
slide.completed.connect(on_input_slide_ended)
|
|
||||||
|
|
||||||
hit.triggered.connect(on_input_hit)
|
hit.triggered.connect(on_input_hit)
|
||||||
parry.triggered.connect(on_input_parry)
|
parry.triggered.connect(on_input_parry)
|
||||||
@@ -102,8 +100,6 @@ func on_input_aim_released():
|
|||||||
|
|
||||||
func on_input_slide_started():
|
func on_input_slide_started():
|
||||||
input_slide_started.emit()
|
input_slide_started.emit()
|
||||||
func on_input_slide_ongoing():
|
|
||||||
input_slide_ongoing.emit()
|
|
||||||
func on_input_slide_ended():
|
func on_input_slide_ended():
|
||||||
input_slide_ended.emit()
|
input_slide_ended.emit()
|
||||||
|
|
||||||
|
|||||||
@@ -81,19 +81,6 @@ public partial class MantleSystem: Node3D
|
|||||||
// Got to the other side of the wall, we stop there
|
// Got to the other side of the wall, we stop there
|
||||||
if (!wallProfileShapecast.IsColliding())
|
if (!wallProfileShapecast.IsColliding())
|
||||||
{
|
{
|
||||||
/*EndedOnOtherSideOfWall = true;
|
|
||||||
|
|
||||||
var origin = globalTargetPosition;
|
|
||||||
var end = origin + Vector3.Down*0.51f; // We check for the ground a bit below our target
|
|
||||||
var groundQuery = PhysicsRayQueryParameters3D.Create(origin, end, wallProfileShapecast.CollisionMask);
|
|
||||||
var groundResult = spaceState.IntersectRay(groundQuery);
|
|
||||||
if (groundResult.Count > 0)
|
|
||||||
{
|
|
||||||
// We found the ground, this is our final location
|
|
||||||
FoundGround = true;
|
|
||||||
Vector3 position = (Vector3) groundResult["position"];
|
|
||||||
MantleCurve.AddPoint(ToLocal(position));
|
|
||||||
}*/
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ visible = false
|
|||||||
shape = SubResource("CapsuleShape3D_4coqe")
|
shape = SubResource("CapsuleShape3D_4coqe")
|
||||||
target_position = Vector3(0, 0, 0)
|
target_position = Vector3(0, 0, 0)
|
||||||
max_results = 1
|
max_results = 1
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
debug_shape_custom_color = Color(1, 0, 0, 1)
|
debug_shape_custom_color = Color(1, 0, 0, 1)
|
||||||
|
|
||||||
[node name="WallInFrontCast3D" type="ShapeCast3D" parent="."]
|
[node name="WallInFrontCast3D" type="ShapeCast3D" parent="."]
|
||||||
@@ -37,20 +37,20 @@ visible = false
|
|||||||
shape = SubResource("SphereShape3D_2oobp")
|
shape = SubResource("SphereShape3D_2oobp")
|
||||||
target_position = Vector3(0, 0, -1.5)
|
target_position = Vector3(0, 0, -1.5)
|
||||||
max_results = 1
|
max_results = 1
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
debug_shape_custom_color = Color(0.911631, 0.11884, 0.656218, 1)
|
debug_shape_custom_color = Color(0.911631, 0.11884, 0.656218, 1)
|
||||||
|
|
||||||
[node name="InAirWallDetect" type="ShapeCast3D" parent="."]
|
[node name="InAirWallDetect" type="ShapeCast3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.01, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.01, 0)
|
||||||
shape = SubResource("CapsuleShape3D_2oobp")
|
shape = SubResource("CapsuleShape3D_2oobp")
|
||||||
target_position = Vector3(0, 0, -2)
|
target_position = Vector3(0, 0, -2)
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="GroundedWallDetect" type="ShapeCast3D" parent="."]
|
[node name="GroundedWallDetect" type="ShapeCast3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.26, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.26, 0)
|
||||||
shape = SubResource("CapsuleShape3D_i32qj")
|
shape = SubResource("CapsuleShape3D_i32qj")
|
||||||
target_position = Vector3(0, 0, -2)
|
target_position = Vector3(0, 0, -2)
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="WallProfileShapeCasts" type="Node3D" parent="."]
|
[node name="WallProfileShapeCasts" type="Node3D" parent="."]
|
||||||
|
|
||||||
@@ -59,46 +59,46 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, -0.5)
|
|||||||
enabled = false
|
enabled = false
|
||||||
shape = SubResource("SphereShape3D_i32qj")
|
shape = SubResource("SphereShape3D_i32qj")
|
||||||
target_position = Vector3(0, -2.125, 0)
|
target_position = Vector3(0, -2.125, 0)
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="ShapeCast2" type="ShapeCast3D" parent="WallProfileShapeCasts"]
|
[node name="ShapeCast2" type="ShapeCast3D" parent="WallProfileShapeCasts"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, -0.75)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, -0.75)
|
||||||
enabled = false
|
enabled = false
|
||||||
shape = SubResource("SphereShape3D_i32qj")
|
shape = SubResource("SphereShape3D_i32qj")
|
||||||
target_position = Vector3(0, -2.125, 0)
|
target_position = Vector3(0, -2.125, 0)
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="ShapeCast3" type="ShapeCast3D" parent="WallProfileShapeCasts"]
|
[node name="ShapeCast3" type="ShapeCast3D" parent="WallProfileShapeCasts"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, -1)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, -1)
|
||||||
enabled = false
|
enabled = false
|
||||||
shape = SubResource("SphereShape3D_i32qj")
|
shape = SubResource("SphereShape3D_i32qj")
|
||||||
target_position = Vector3(0, -2.125, 0)
|
target_position = Vector3(0, -2.125, 0)
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="ShapeCast4" type="ShapeCast3D" parent="WallProfileShapeCasts"]
|
[node name="ShapeCast4" type="ShapeCast3D" parent="WallProfileShapeCasts"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, -1.25)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, -1.25)
|
||||||
enabled = false
|
enabled = false
|
||||||
shape = SubResource("SphereShape3D_i32qj")
|
shape = SubResource("SphereShape3D_i32qj")
|
||||||
target_position = Vector3(0, -2.125, 0)
|
target_position = Vector3(0, -2.125, 0)
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="ShapeCast5" type="ShapeCast3D" parent="WallProfileShapeCasts"]
|
[node name="ShapeCast5" type="ShapeCast3D" parent="WallProfileShapeCasts"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, -1.5)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, -1.5)
|
||||||
enabled = false
|
enabled = false
|
||||||
shape = SubResource("SphereShape3D_i32qj")
|
shape = SubResource("SphereShape3D_i32qj")
|
||||||
target_position = Vector3(0, -2.125, 0)
|
target_position = Vector3(0, -2.125, 0)
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="ShapeCast6" type="ShapeCast3D" parent="WallProfileShapeCasts"]
|
[node name="ShapeCast6" type="ShapeCast3D" parent="WallProfileShapeCasts"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, -1.75)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, -1.75)
|
||||||
enabled = false
|
enabled = false
|
||||||
shape = SubResource("SphereShape3D_i32qj")
|
shape = SubResource("SphereShape3D_i32qj")
|
||||||
target_position = Vector3(0, -2.125, 0)
|
target_position = Vector3(0, -2.125, 0)
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="ShapeCast7" type="ShapeCast3D" parent="WallProfileShapeCasts"]
|
[node name="ShapeCast7" type="ShapeCast3D" parent="WallProfileShapeCasts"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, -2)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, -2)
|
||||||
enabled = false
|
enabled = false
|
||||||
shape = SubResource("SphereShape3D_i32qj")
|
shape = SubResource("SphereShape3D_i32qj")
|
||||||
target_position = Vector3(0, -2.125, 0)
|
target_position = Vector3(0, -2.125, 0)
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
|
|||||||
@@ -1,221 +0,0 @@
|
|||||||
using Godot;
|
|
||||||
using Movementtests.player_controller.Scripts;
|
|
||||||
using RustyOptions;
|
|
||||||
|
|
||||||
namespace Movementtests.systems;
|
|
||||||
|
|
||||||
public partial class MoveSystem : Node3D
|
|
||||||
{
|
|
||||||
public enum JumpTypes
|
|
||||||
{
|
|
||||||
SimpleJump,
|
|
||||||
DoubleJump,
|
|
||||||
JumpFromDash,
|
|
||||||
JumpFromWall
|
|
||||||
}
|
|
||||||
|
|
||||||
public record MoveSystemParameters(
|
|
||||||
CharacterBody3D Parent,
|
|
||||||
Gravity Gravity,
|
|
||||||
MantleSystem MantleSystem,
|
|
||||||
TweenQueueSystem TweenQueueSystem,
|
|
||||||
HeadSystem HeadSystem,
|
|
||||||
CapsuleCollider CapsuleCollider);
|
|
||||||
|
|
||||||
public record MoveAroundParameters(
|
|
||||||
double Delta,
|
|
||||||
Vector3 MovementDirection,
|
|
||||||
bool IsOnFloor,
|
|
||||||
bool IsDead,
|
|
||||||
bool IsHeadTouchingCeiling,
|
|
||||||
bool isHanging,
|
|
||||||
bool isWallHugging
|
|
||||||
);
|
|
||||||
|
|
||||||
[Export(PropertyHint.Range, "0,20,0.1,or_greater")]
|
|
||||||
public float WalkSpeed { get; set; } = 5.0f;
|
|
||||||
[Export(PropertyHint.Range, "0,20,0.1,or_greater")]
|
|
||||||
public float SprintSpeed { get; set; } = 7.2f;
|
|
||||||
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
|
||||||
public float CrouchSpeed { get; set; } = 2.5f;
|
|
||||||
[Export(PropertyHint.Range, "0,100,0.1,or_greater")]
|
|
||||||
|
|
||||||
public float _currentSpeed;
|
|
||||||
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
|
||||||
public float AccelerationSpeedFactorFloor = 5.0f;
|
|
||||||
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
|
||||||
public float DecelerationSpeedFactorFloor = 5.0f;
|
|
||||||
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
|
||||||
public float DecelerationSpeedFactorAir = 1.0f;
|
|
||||||
[Export(PropertyHint.Range, "0,1,0.01,or_greater")]
|
|
||||||
public float ApexHoldTime = 0.0f;
|
|
||||||
private float _timeLeftAtApex = 0.0f;
|
|
||||||
private bool _wasGoingUpLastFrame = false;
|
|
||||||
|
|
||||||
public float CrouchTransitionSpeed { get; set; } = 20.0f;
|
|
||||||
[Export(PropertyHint.Range, "0,5,0.1,or_greater")]
|
|
||||||
public float WallHugGravityReducingFactor { get; set; } = 0.1f;
|
|
||||||
|
|
||||||
|
|
||||||
private Gravity _gravity;
|
|
||||||
private CharacterBody3D _parent;
|
|
||||||
private MantleSystem _mantleSystem;
|
|
||||||
private TweenQueueSystem _tweenQueueSystem;
|
|
||||||
private CapsuleCollider _capsuleCollider;
|
|
||||||
private HeadSystem _headSystem;
|
|
||||||
public void Init(MoveSystemParameters parameters)
|
|
||||||
{
|
|
||||||
_parent = parameters.Parent;
|
|
||||||
_gravity = parameters.Gravity;
|
|
||||||
_mantleSystem = parameters.MantleSystem;
|
|
||||||
_tweenQueueSystem = parameters.TweenQueueSystem;
|
|
||||||
_capsuleCollider = parameters.CapsuleCollider;
|
|
||||||
_headSystem = parameters.HeadSystem;
|
|
||||||
|
|
||||||
_currentSpeed = WalkSpeed;
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool IsGoingUp()
|
|
||||||
{
|
|
||||||
return _parent.Velocity.Y > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void MoveAround(MoveAroundParameters param)
|
|
||||||
{
|
|
||||||
var (delta, movementDirection, isOnFloor, isDead, isHeadTouchingCeiling, isHanging, isWallHugging) = param;
|
|
||||||
|
|
||||||
var doesCapsuleHaveCrouchingHeight = _capsuleCollider.IsCrouchingHeight();
|
|
||||||
var doesCapsuleHaveDefaultHeight = _capsuleCollider.IsDefaultHeight();
|
|
||||||
|
|
||||||
if (IsGoingUp() || isOnFloor)
|
|
||||||
{
|
|
||||||
_wasGoingUpLastFrame = true;
|
|
||||||
_timeLeftAtApex = ApexHoldTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isHanging)
|
|
||||||
{
|
|
||||||
_parent.Velocity = Vector3.Zero;
|
|
||||||
_parent.MoveAndSlide();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (isWallHugging)
|
|
||||||
{
|
|
||||||
_parent.Velocity = new Vector3(
|
|
||||||
x: _parent.Velocity.X,
|
|
||||||
y: _parent.Velocity.Y - _gravity.CalculateGravityForce() * (float)delta * WallHugGravityReducingFactor,
|
|
||||||
z: _parent.Velocity.Z);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Adding the gravity
|
|
||||||
if (!isOnFloor)
|
|
||||||
{
|
|
||||||
if (!IsGoingUp() && _wasGoingUpLastFrame && _timeLeftAtApex > 0)
|
|
||||||
{
|
|
||||||
_parent.Velocity = new Vector3(
|
|
||||||
x: _parent.Velocity.X,
|
|
||||||
y: 0,
|
|
||||||
z: _parent.Velocity.Z);
|
|
||||||
_timeLeftAtApex -= (float) delta;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_parent.Velocity = new Vector3(
|
|
||||||
x: _parent.Velocity.X,
|
|
||||||
y: _parent.Velocity.Y - (_gravity.CalculateGravityForce() * (float)delta),
|
|
||||||
z: _parent.Velocity.Z);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// The code below is required to quickly adjust player's position on Y-axis when there's a ceiling on the
|
|
||||||
// trajectory of player's jump and player is standing
|
|
||||||
if (isHeadTouchingCeiling && doesCapsuleHaveDefaultHeight)
|
|
||||||
{
|
|
||||||
_parent.Velocity = new Vector3(
|
|
||||||
x: _parent.Velocity.X,
|
|
||||||
y: _parent.Velocity.Y - 2.0f,
|
|
||||||
z: _parent.Velocity.Z);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isDead)
|
|
||||||
{
|
|
||||||
|
|
||||||
// Used both for detecting the moment when we enter into crouching mode and the moment when we're already
|
|
||||||
// in the crouching mode
|
|
||||||
if (Input.IsActionPressed("crouch") ||
|
|
||||||
(doesCapsuleHaveCrouchingHeight && isHeadTouchingCeiling))
|
|
||||||
{
|
|
||||||
_capsuleCollider.Crouch((float)delta, CrouchTransitionSpeed);
|
|
||||||
_currentSpeed = CrouchSpeed;
|
|
||||||
}
|
|
||||||
// Used both for the moment when we exit the crouching mode and for the moment when we just walk
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_capsuleCollider.UndoCrouching((float)delta, CrouchTransitionSpeed);
|
|
||||||
_currentSpeed = WalkSpeed;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Each component of the boolean statement for sprinting is required
|
|
||||||
if (Input.IsActionPressed("sprint") && !isHeadTouchingCeiling &&
|
|
||||||
!doesCapsuleHaveCrouchingHeight && !isDead)
|
|
||||||
{
|
|
||||||
_currentSpeed = SprintSpeed;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Basis is a 3x4 matrix. It contains information about scaling and rotation of head.
|
|
||||||
// By multiplying our Vector3 by this matrix we're doing multiple things:
|
|
||||||
// a) We start to operate in global space;
|
|
||||||
// b) We're applying to Vector3 the current rotation of "head" object;
|
|
||||||
// c) We're applying to Vector3 the current scaling of "head" object;
|
|
||||||
Vector3 direction = _headSystem.Transform.Basis * movementDirection;
|
|
||||||
|
|
||||||
if (isDead)
|
|
||||||
{
|
|
||||||
direction = Vector3.Zero;
|
|
||||||
}
|
|
||||||
|
|
||||||
var accelerationFloorFactor = direction.Length() > 0 ? AccelerationSpeedFactorFloor : DecelerationSpeedFactorFloor;
|
|
||||||
var accelerationFactor = isOnFloor ? accelerationFloorFactor : DecelerationSpeedFactorAir;
|
|
||||||
|
|
||||||
float xAcceleration = Mathf.Lerp(_parent.Velocity.X, direction.X * _currentSpeed,
|
|
||||||
(float)delta * accelerationFactor);
|
|
||||||
float zAcceleration = Mathf.Lerp(_parent.Velocity.Z, direction.Z * _currentSpeed,
|
|
||||||
(float)delta * accelerationFactor);
|
|
||||||
_parent.Velocity = new Vector3(xAcceleration, _parent.Velocity.Y, zAcceleration);
|
|
||||||
|
|
||||||
if (isDead)
|
|
||||||
{
|
|
||||||
_parent.MoveAndSlide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Jump(JumpTypes jumpType, Vector3? jumpDirection = null, float boost = 1.0f)
|
|
||||||
{
|
|
||||||
var effectiveJumpDirection = jumpDirection ?? Vector3.Up;
|
|
||||||
var jumpForce = 0.0f;
|
|
||||||
switch (jumpType)
|
|
||||||
{
|
|
||||||
case JumpTypes.DoubleJump:
|
|
||||||
jumpForce = _gravity.CalculateDoubleJumpForce();
|
|
||||||
break;
|
|
||||||
case JumpTypes.SimpleJump:
|
|
||||||
jumpForce = _gravity.CalculateJumpForce();
|
|
||||||
break;
|
|
||||||
case JumpTypes.JumpFromDash:
|
|
||||||
jumpForce = _gravity.CalculateJumpFromDashForce();
|
|
||||||
break;
|
|
||||||
case JumpTypes.JumpFromWall:
|
|
||||||
jumpForce = _gravity.CalculateJumpFromWallForce();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
jumpForce = _gravity.CalculateJumpForce();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
var currentHorizontalVelocity = new Vector3(_parent.Velocity.X, 0, _parent.Velocity.Z);
|
|
||||||
var jumpVelocity = jumpForce * effectiveJumpDirection * boost;
|
|
||||||
_parent.Velocity = currentHorizontalVelocity + jumpVelocity;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://dyy5njw6pxoh4
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
[gd_resource type="Curve" format=3 uid="uid://buxwd3wd0nln5"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
_data = [Vector2(0, 0), 0.0, 3.01651, 0, 0, Vector2(0.996169, 1), 0.0, 0.0, 0, 0]
|
|
||||||
point_count = 2
|
|
||||||
@@ -40,7 +40,7 @@ public partial class WallHugSystem : Node3D
|
|||||||
{
|
{
|
||||||
foreach (RayCast3D raycast in _raycasts)
|
foreach (RayCast3D raycast in _raycasts)
|
||||||
{
|
{
|
||||||
if (raycast.IsColliding())
|
if (raycast.IsColliding() && Math.Abs(raycast.GetCollisionNormal().Y) < 0.3f)
|
||||||
{
|
{
|
||||||
WallHugLocation = raycast.GetCollisionPoint().Some();
|
WallHugLocation = raycast.GetCollisionPoint().Some();
|
||||||
WallHugNormal = raycast.GetCollisionNormal().Some();
|
WallHugNormal = raycast.GetCollisionNormal().Some();
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ stencil_outline_thickness = 0.1
|
|||||||
material = SubResource("StandardMaterial3D_m0v1h")
|
material = SubResource("StandardMaterial3D_m0v1h")
|
||||||
|
|
||||||
[node name="Weapon" type="RigidBody3D"]
|
[node name="Weapon" type="RigidBody3D"]
|
||||||
collision_layer = 4
|
collision_layer = 65536
|
||||||
collision_mask = 2
|
collision_mask = 256
|
||||||
continuous_cd = true
|
continuous_cd = true
|
||||||
contact_monitor = true
|
contact_monitor = true
|
||||||
max_contacts_reported = 1
|
max_contacts_reported = 1
|
||||||
|
|||||||
Reference in New Issue
Block a user