wall run, keyboard controls, mouse sensitivity setting, and more
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
[gd_scene load_steps=41 format=3 uid="uid://dmkw8cmalm5k"]
|
[gd_scene load_steps=42 format=3 uid="uid://dmkw8cmalm5k"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://bei4nhkf8lwdo" path="res://player_controller/PlayerController.tscn" id="1_2vsi6"]
|
[ext_resource type="PackedScene" uid="uid://bei4nhkf8lwdo" path="res://player_controller/PlayerController.tscn" id="1_2vsi6"]
|
||||||
|
[ext_resource type="Script" uid="uid://blenis2y55fmg" path="res://tools/city_helpers.gd" id="1_qwuk2"]
|
||||||
[ext_resource type="Texture2D" uid="uid://ca4kkq3w8cd4n" path="res://assets/sky/sky_15_2k.png" id="2_ruo5i"]
|
[ext_resource type="Texture2D" uid="uid://ca4kkq3w8cd4n" path="res://assets/sky/sky_15_2k.png" id="2_ruo5i"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dkr80d2pi0d41" path="res://addons/guide/debugger/guide_debugger.tscn" id="2_uet8a"]
|
[ext_resource type="PackedScene" uid="uid://dkr80d2pi0d41" path="res://addons/guide/debugger/guide_debugger.tscn" id="2_uet8a"]
|
||||||
[ext_resource type="Texture2D" uid="uid://7kcmi16gedd0" path="res://assets/LD-0001.png" id="3_ruo5i"]
|
[ext_resource type="Texture2D" uid="uid://7kcmi16gedd0" path="res://assets/LD-0001.png" id="3_ruo5i"]
|
||||||
@@ -91,11 +92,13 @@ font_size = 30
|
|||||||
[sub_resource type="BoxMesh" id="BoxMesh_p287n"]
|
[sub_resource type="BoxMesh" id="BoxMesh_p287n"]
|
||||||
|
|
||||||
[node name="Main" type="Node3D"]
|
[node name="Main" type="Node3D"]
|
||||||
|
script = ExtResource("1_qwuk2")
|
||||||
|
|
||||||
[node name="Player" parent="." node_paths=PackedStringArray("TutorialWeaponTarget") instance=ExtResource("1_2vsi6")]
|
[node name="Player" parent="." node_paths=PackedStringArray("TutorialWeaponTarget") instance=ExtResource("1_2vsi6")]
|
||||||
transform = Transform3D(0.054514527, 0, -0.9985129, 0, 1, 0, 0.9985129, 0, 0.054514527, -0.17818737, -132.74933, 118.101845)
|
transform = Transform3D(0.054514527, 0, -0.9985129, 0, 1, 0, 0.9985129, 0, 0.054514527, -6, 75.5, -13.5)
|
||||||
collision_layer = 17
|
collision_layer = 17
|
||||||
TutorialWeaponTarget = NodePath("../PlacedTutorialWeapon/WeaponLocationTarget")
|
TutorialWeaponTarget = NodePath("../PlacedTutorialWeapon/WeaponLocationTarget")
|
||||||
|
TutorialDone = true
|
||||||
AccelerationAir = 1.5
|
AccelerationAir = 1.5
|
||||||
|
|
||||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||||
@@ -260,6 +263,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.7500105, 4, 0.7499695)
|
|||||||
shape = SubResource("BoxShape3D_pxspk")
|
shape = SubResource("BoxShape3D_pxspk")
|
||||||
|
|
||||||
[node name="TutorialController" type="Control" parent="."]
|
[node name="TutorialController" type="Control" parent="."]
|
||||||
|
visible = false
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
|
|||||||
@@ -33,20 +33,38 @@ alignment = 1
|
|||||||
|
|
||||||
[node name="LookSensitivityControl" parent="VBoxContainer/MarginContainer/VBoxContainer" instance=ExtResource("2_iyvrj")]
|
[node name="LookSensitivityControl" parent="VBoxContainer/MarginContainer/VBoxContainer" instance=ExtResource("2_iyvrj")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
option_name = "Look Sensitivity"
|
option_name = "Joystick Sensitivity"
|
||||||
option_section = 1
|
option_section = 1
|
||||||
key = "LookSensitivity"
|
key = "LookSensitivity"
|
||||||
section = "InputSettings"
|
section = "InputSettings"
|
||||||
|
|
||||||
[node name="OptionLabel" parent="VBoxContainer/MarginContainer/VBoxContainer/LookSensitivityControl" index="0"]
|
[node name="OptionLabel" parent="VBoxContainer/MarginContainer/VBoxContainer/LookSensitivityControl" index="0"]
|
||||||
text = "Look Sensitivity :"
|
text = "Joystick Sensitivity :"
|
||||||
|
|
||||||
[node name="HSlider" parent="VBoxContainer/MarginContainer/VBoxContainer/LookSensitivityControl" index="1"]
|
[node name="HSlider" parent="VBoxContainer/MarginContainer/VBoxContainer/LookSensitivityControl" index="1"]
|
||||||
min_value = 0.2
|
min_value = 0.2
|
||||||
max_value = 2.0
|
max_value = 2.0
|
||||||
step = 0.2
|
step = 0.2
|
||||||
|
value = 2.0
|
||||||
tick_count = 10
|
tick_count = 10
|
||||||
|
|
||||||
|
[node name="MouseSensitivityControl" parent="VBoxContainer/MarginContainer/VBoxContainer" instance=ExtResource("2_iyvrj")]
|
||||||
|
layout_mode = 2
|
||||||
|
option_name = "Mouse Sensitivity"
|
||||||
|
option_section = 1
|
||||||
|
key = "MouseSensitivity"
|
||||||
|
section = "InputSettings"
|
||||||
|
|
||||||
|
[node name="OptionLabel" parent="VBoxContainer/MarginContainer/VBoxContainer/MouseSensitivityControl" index="0"]
|
||||||
|
text = "Mouse Sensitivity :"
|
||||||
|
|
||||||
|
[node name="HSlider" parent="VBoxContainer/MarginContainer/VBoxContainer/MouseSensitivityControl" index="1"]
|
||||||
|
min_value = 1.0
|
||||||
|
max_value = 20.0
|
||||||
|
step = 1.0
|
||||||
|
value = 5.0
|
||||||
|
tick_count = 20
|
||||||
|
|
||||||
[node name="HeadBobbingControl" parent="VBoxContainer/MarginContainer/VBoxContainer" instance=ExtResource("2_iyvrj")]
|
[node name="HeadBobbingControl" parent="VBoxContainer/MarginContainer/VBoxContainer" instance=ExtResource("2_iyvrj")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
option_name = "Head Bobbing while walking"
|
option_name = "Head Bobbing while walking"
|
||||||
@@ -76,5 +94,6 @@ step = 0.1
|
|||||||
tick_count = 10
|
tick_count = 10
|
||||||
|
|
||||||
[editable path="VBoxContainer/MarginContainer/VBoxContainer/LookSensitivityControl"]
|
[editable path="VBoxContainer/MarginContainer/VBoxContainer/LookSensitivityControl"]
|
||||||
|
[editable path="VBoxContainer/MarginContainer/VBoxContainer/MouseSensitivityControl"]
|
||||||
[editable path="VBoxContainer/MarginContainer/VBoxContainer/HeadBobbingControl"]
|
[editable path="VBoxContainer/MarginContainer/VBoxContainer/HeadBobbingControl"]
|
||||||
[editable path="VBoxContainer/MarginContainer/VBoxContainer/FOVChangeControl"]
|
[editable path="VBoxContainer/MarginContainer/VBoxContainer/FOVChangeControl"]
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
[gd_scene load_steps=45 format=3 uid="uid://bei4nhkf8lwdo"]
|
[gd_scene load_steps=49 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="Resource" uid="uid://bl5crtu1gkrtr" path="res://systems/inputs/base_mode/base_mode.tres" id="3_cresl"]
|
[ext_resource type="Resource" uid="uid://bl5crtu1gkrtr" path="res://systems/inputs/base_mode/base_mode.tres" id="3_cresl"]
|
||||||
[ext_resource type="Resource" uid="uid://cpdaw41ah5gic" path="res://systems/inputs/base_mode/rotate_y.tres" id="4_rxwoh"]
|
[ext_resource type="Resource" uid="uid://cpdaw41ah5gic" path="res://systems/inputs/base_mode/rotate_y.tres" id="4_rxwoh"]
|
||||||
[ext_resource type="Resource" uid="uid://ccrb5xsnphc8" path="res://systems/inputs/base_mode/rotate_floorplane.tres" id="5_4u7i3"]
|
[ext_resource type="Resource" uid="uid://ccrb5xsnphc8" path="res://systems/inputs/base_mode/rotate_floorplane.tres" id="5_4u7i3"]
|
||||||
|
[ext_resource type="Resource" uid="uid://f3vs6l4m623s" path="res://systems/inputs/base_mode/move_left.tres" id="5_q14ux"]
|
||||||
[ext_resource type="Script" uid="uid://dv7v1ywmbvvcd" path="res://player_controller/Scripts/HealthSystem.cs" id="5_umw0l"]
|
[ext_resource type="Script" uid="uid://dv7v1ywmbvvcd" path="res://player_controller/Scripts/HealthSystem.cs" id="5_umw0l"]
|
||||||
[ext_resource type="Script" uid="uid://vuq8rjq3vegn" path="res://player_controller/Scripts/Stamina.cs" id="6_lxtc4"]
|
[ext_resource type="Script" uid="uid://vuq8rjq3vegn" path="res://player_controller/Scripts/Stamina.cs" id="6_lxtc4"]
|
||||||
|
[ext_resource type="Resource" uid="uid://t612lts1wi1s" path="res://systems/inputs/base_mode/move_right.tres" id="6_q7bng"]
|
||||||
[ext_resource type="Script" uid="uid://cwbvxlfvmocc1" path="res://player_controller/Scripts/StairsSystem.cs" id="7_bmt5a"]
|
[ext_resource type="Script" uid="uid://cwbvxlfvmocc1" path="res://player_controller/Scripts/StairsSystem.cs" id="7_bmt5a"]
|
||||||
|
[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://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="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"]
|
||||||
@@ -87,6 +91,10 @@ WallHugHorizontalDeceleration = 0.5
|
|||||||
script = ExtResource("16_v31n3")
|
script = ExtResource("16_v31n3")
|
||||||
base_mode = ExtResource("3_cresl")
|
base_mode = ExtResource("3_cresl")
|
||||||
move = ExtResource("17_h6vvl")
|
move = ExtResource("17_h6vvl")
|
||||||
|
move_left = ExtResource("5_q14ux")
|
||||||
|
move_right = ExtResource("6_q7bng")
|
||||||
|
move_front = ExtResource("7_m8gvy")
|
||||||
|
move_back = ExtResource("8_jb43f")
|
||||||
rotate_y = ExtResource("4_rxwoh")
|
rotate_y = ExtResource("4_rxwoh")
|
||||||
rotate_floorplane = ExtResource("5_4u7i3")
|
rotate_floorplane = ExtResource("5_4u7i3")
|
||||||
aim_down = ExtResource("8_obsfv")
|
aim_down = ExtResource("8_obsfv")
|
||||||
@@ -170,18 +178,38 @@ script = ExtResource("27_n7qhm")
|
|||||||
target_position = Vector3(0, 0, 1)
|
target_position = Vector3(0, 0, 1)
|
||||||
collision_mask = 2
|
collision_mask = 2
|
||||||
|
|
||||||
|
[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)
|
||||||
|
target_position = Vector3(0, 0, 1)
|
||||||
|
collision_mask = 2
|
||||||
|
|
||||||
[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 = 2
|
||||||
|
|
||||||
|
[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)
|
||||||
|
target_position = Vector3(0, 0, -1)
|
||||||
|
collision_mask = 2
|
||||||
|
|
||||||
[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 = 2
|
||||||
|
|
||||||
|
[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)
|
||||||
|
target_position = Vector3(1, 0, 0)
|
||||||
|
collision_mask = 2
|
||||||
|
|
||||||
[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 = 2
|
||||||
|
|
||||||
|
[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)
|
||||||
|
target_position = Vector3(-1, 0, 0)
|
||||||
|
collision_mask = 2
|
||||||
|
|
||||||
[node name="DashSystem" parent="." instance=ExtResource("18_q5h8a")]
|
[node name="DashSystem" parent="." instance=ExtResource("18_q5h8a")]
|
||||||
DashSpeed = 0.2
|
DashSpeed = 0.2
|
||||||
PostDashSpeed = 30.0
|
PostDashSpeed = 30.0
|
||||||
@@ -566,6 +594,12 @@ to = NodePath("../../OnWall/Hugging")
|
|||||||
event = &"wall_hug"
|
event = &"wall_hug"
|
||||||
delay_in_seconds = "0.0"
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
|
[node name="OnWallRun" type="Node" parent="StateChart/Root/Movement/Airborne"]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../OnWall/Running")
|
||||||
|
event = &"wall_run"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="OnDash" type="Node" parent="StateChart/Root/Movement/Airborne"]
|
[node name="OnDash" type="Node" parent="StateChart/Root/Movement/Airborne"]
|
||||||
script = ExtResource("28_n7qhm")
|
script = ExtResource("28_n7qhm")
|
||||||
to = NodePath("../../Dashing/Dash")
|
to = NodePath("../../Dashing/Dash")
|
||||||
@@ -651,50 +685,27 @@ to = NodePath("../../Jump/MegaJump")
|
|||||||
event = &"megajump"
|
event = &"megajump"
|
||||||
delay_in_seconds = "0.0"
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="HugCanceled" type="Node" parent="StateChart/Root/Movement/OnWall"]
|
[node name="OnLeaveWall" type="Node" parent="StateChart/Root/Movement/OnWall"]
|
||||||
script = ExtResource("27_34snm")
|
|
||||||
|
|
||||||
[node name="ToHanging" type="Node" parent="StateChart/Root/Movement/OnWall/HugCanceled"]
|
|
||||||
script = ExtResource("28_n7qhm")
|
script = ExtResource("28_n7qhm")
|
||||||
to = NodePath("../../Hanging")
|
to = NodePath("../../Airborne/Reset")
|
||||||
event = &"oh_hit_wall"
|
event = &"start_falling"
|
||||||
delay_in_seconds = "0.0"
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="Hugging" type="Node" parent="StateChart/Root/Movement/OnWall"]
|
[node name="Hugging" type="Node" parent="StateChart/Root/Movement/OnWall"]
|
||||||
script = ExtResource("27_34snm")
|
script = ExtResource("27_34snm")
|
||||||
|
|
||||||
[node name="OnGrounded" type="Node" parent="StateChart/Root/Movement/OnWall/Hugging"]
|
|
||||||
script = ExtResource("28_n7qhm")
|
|
||||||
to = NodePath("../../../Grounded")
|
|
||||||
event = &"grounded"
|
|
||||||
delay_in_seconds = "0.0"
|
|
||||||
|
|
||||||
[node name="OnLeaveWall" type="Node" parent="StateChart/Root/Movement/OnWall/Hugging"]
|
|
||||||
script = ExtResource("28_n7qhm")
|
|
||||||
to = NodePath("../../../Airborne/CoyoteEnabled")
|
|
||||||
event = &"start_falling"
|
|
||||||
delay_in_seconds = "0.0"
|
|
||||||
|
|
||||||
[node name="OnDrop" type="Node" parent="StateChart/Root/Movement/OnWall/Hugging"]
|
|
||||||
script = ExtResource("28_n7qhm")
|
|
||||||
to = NodePath("../../HugCanceled")
|
|
||||||
event = &"__unused_dash"
|
|
||||||
delay_in_seconds = "0.0"
|
|
||||||
|
|
||||||
[node name="Hanging" type="Node" parent="StateChart/Root/Movement/OnWall"]
|
[node name="Hanging" type="Node" parent="StateChart/Root/Movement/OnWall"]
|
||||||
script = ExtResource("27_34snm")
|
script = ExtResource("27_34snm")
|
||||||
|
|
||||||
[node name="OnDrop" type="Node" parent="StateChart/Root/Movement/OnWall/Hanging"]
|
[node name="Running" type="Node" parent="StateChart/Root/Movement/OnWall"]
|
||||||
script = ExtResource("28_n7qhm")
|
script = ExtResource("27_34snm")
|
||||||
to = NodePath("../../Hugging")
|
|
||||||
event = &"dash"
|
|
||||||
delay_in_seconds = "0.0"
|
|
||||||
|
|
||||||
[connection signal="input_aim_canceled" from="InputController" to="." method="OnInputAimCanceled"]
|
[connection signal="input_aim_canceled" from="InputController" to="." method="OnInputAimCanceled"]
|
||||||
[connection signal="input_aim_down" from="InputController" to="." method="OnInputAimDown"]
|
[connection signal="input_aim_down" from="InputController" to="." method="OnInputAimDown"]
|
||||||
[connection signal="input_aim_pressed" from="InputController" to="." method="OnInputAimPressed"]
|
[connection signal="input_aim_pressed" from="InputController" to="." method="OnInputAimPressed"]
|
||||||
[connection signal="input_aim_released" from="InputController" to="." method="OnInputAimReleased"]
|
[connection signal="input_aim_released" from="InputController" to="." method="OnInputAimReleased"]
|
||||||
[connection signal="input_dash" from="InputController" to="." method="OnInputDashPressed"]
|
[connection signal="input_dash" from="InputController" to="." method="OnInputDashPressed"]
|
||||||
|
[connection signal="input_device_changed" from="InputController" to="." method="InputDeviceChanged"]
|
||||||
[connection signal="input_empower_down" from="InputController" to="." method="OnInputEmpowerDown"]
|
[connection signal="input_empower_down" from="InputController" to="." method="OnInputEmpowerDown"]
|
||||||
[connection signal="input_empower_released" from="InputController" to="." method="OnInputEmpowerReleased"]
|
[connection signal="input_empower_released" from="InputController" to="." method="OnInputEmpowerReleased"]
|
||||||
[connection signal="input_hit" from="InputController" to="." method="OnInputHitPressed"]
|
[connection signal="input_hit" from="InputController" to="." method="OnInputHitPressed"]
|
||||||
@@ -702,6 +713,7 @@ delay_in_seconds = "0.0"
|
|||||||
[connection signal="input_jump_ongoing" from="InputController" to="." method="OnInputJumpOngoing"]
|
[connection signal="input_jump_ongoing" from="InputController" to="." method="OnInputJumpOngoing"]
|
||||||
[connection signal="input_jump_started" from="InputController" to="." method="OnInputJumpStarted"]
|
[connection signal="input_jump_started" from="InputController" to="." method="OnInputJumpStarted"]
|
||||||
[connection signal="input_move" from="InputController" to="." method="OnInputMove"]
|
[connection signal="input_move" from="InputController" to="." method="OnInputMove"]
|
||||||
|
[connection signal="input_move_keyboard" from="InputController" to="." method="OnInputMoveKeyboard"]
|
||||||
[connection signal="input_rotate_floorplane" from="InputController" to="." method="OnInputRotateFloorplane"]
|
[connection signal="input_rotate_floorplane" from="InputController" to="." method="OnInputRotateFloorplane"]
|
||||||
[connection signal="input_rotate_y" from="InputController" to="." method="OnInputRotateY"]
|
[connection signal="input_rotate_y" from="InputController" to="." method="OnInputRotateY"]
|
||||||
[connection signal="input_throw" from="InputController" to="." method="OnInputThrowPressed"]
|
[connection signal="input_throw" from="InputController" to="." method="OnInputThrowPressed"]
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using Godot;
|
using Godot;
|
||||||
using GodotStateCharts;
|
using GodotStateCharts;
|
||||||
using Movementtests.addons.godot_state_charts.csharp;
|
using Movementtests.addons.godot_state_charts.csharp;
|
||||||
@@ -14,6 +15,7 @@ public partial class PlayerController : CharacterBody3D
|
|||||||
MoveCamera,
|
MoveCamera,
|
||||||
None,
|
None,
|
||||||
}
|
}
|
||||||
|
private bool _isUsingGamepad = false;
|
||||||
|
|
||||||
// User API to important child nodes.
|
// User API to important child nodes.
|
||||||
public HeadSystem HeadSystem;
|
public HeadSystem HeadSystem;
|
||||||
@@ -48,6 +50,7 @@ public partial class PlayerController : CharacterBody3D
|
|||||||
private RayCast3D[] _headCollisionDetectors;
|
private RayCast3D[] _headCollisionDetectors;
|
||||||
|
|
||||||
private Vector3 _inputMove = Vector3.Zero;
|
private Vector3 _inputMove = Vector3.Zero;
|
||||||
|
private Vector3 _inputMoveKeyboard = Vector3.Zero;
|
||||||
private float _inputRotateY;
|
private float _inputRotateY;
|
||||||
private float _inputRotateFloorplane;
|
private float _inputRotateFloorplane;
|
||||||
|
|
||||||
@@ -59,6 +62,7 @@ public partial class PlayerController : CharacterBody3D
|
|||||||
private Timer _powerCooldownTimer;
|
private Timer _powerCooldownTimer;
|
||||||
|
|
||||||
[Export] public Marker3D TutorialWeaponTarget;
|
[Export] public Marker3D TutorialWeaponTarget;
|
||||||
|
[Export] public bool TutorialDone { get; set; }
|
||||||
|
|
||||||
[ExportCategory("Movement")]
|
[ExportCategory("Movement")]
|
||||||
[ExportGroup("Ground")]
|
[ExportGroup("Ground")]
|
||||||
@@ -165,7 +169,6 @@ public partial class PlayerController : CharacterBody3D
|
|||||||
PlayerUi.SetNumberOfDashesLeft(value);
|
PlayerUi.SetNumberOfDashesLeft(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public bool TutorialDone { get; set; }
|
|
||||||
|
|
||||||
public AllowedInputs CurrentlyAllowedInputs { get; set; } = AllowedInputs.All;
|
public AllowedInputs CurrentlyAllowedInputs { get; set; } = AllowedInputs.All;
|
||||||
|
|
||||||
@@ -191,9 +194,10 @@ public partial class PlayerController : CharacterBody3D
|
|||||||
private StateChartState _simpleDash;
|
private StateChartState _simpleDash;
|
||||||
private StateChartState _poweredDash;
|
private StateChartState _poweredDash;
|
||||||
private StateChartState _aimedDash;
|
private StateChartState _aimedDash;
|
||||||
private StateChartState _onWallHugCanceled;
|
private StateChartState _onWall;
|
||||||
private StateChartState _onWallHugging;
|
private StateChartState _onWallHugging;
|
||||||
private StateChartState _onWallHanging;
|
private StateChartState _onWallHanging;
|
||||||
|
private StateChartState _onWallRunning;
|
||||||
|
|
||||||
private Transition _onJumpFromWall;
|
private Transition _onJumpFromWall;
|
||||||
private Transition _onMegajumpFromWall;
|
private Transition _onMegajumpFromWall;
|
||||||
@@ -202,6 +206,7 @@ public partial class PlayerController : CharacterBody3D
|
|||||||
private float _playerRadius;
|
private float _playerRadius;
|
||||||
|
|
||||||
private float _lookSensitivityMultiplier = 1.0f;
|
private float _lookSensitivityMultiplier = 1.0f;
|
||||||
|
private float _mouseSensitivityMultiplier = 1.0f;
|
||||||
private float _headBobbingMultiplier = 1.0f;
|
private float _headBobbingMultiplier = 1.0f;
|
||||||
private float _fovChangeMultiplier = 1.0f;
|
private float _fovChangeMultiplier = 1.0f;
|
||||||
|
|
||||||
@@ -286,9 +291,10 @@ public partial class PlayerController : CharacterBody3D
|
|||||||
_megaJump = StateChartState.Of(GetNode("StateChart/Root/Movement/Jump/MegaJump"));
|
_megaJump = StateChartState.Of(GetNode("StateChart/Root/Movement/Jump/MegaJump"));
|
||||||
_onJumpFromWall = Transition.Of(GetNode("StateChart/Root/Movement/OnWall/OnJump"));
|
_onJumpFromWall = Transition.Of(GetNode("StateChart/Root/Movement/OnWall/OnJump"));
|
||||||
_onMegajumpFromWall = Transition.Of(GetNode("StateChart/Root/Movement/OnWall/OnMegajump"));
|
_onMegajumpFromWall = Transition.Of(GetNode("StateChart/Root/Movement/OnWall/OnMegajump"));
|
||||||
|
_onWall = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall"));
|
||||||
_onWallHugging = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/Hugging"));
|
_onWallHugging = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/Hugging"));
|
||||||
_onWallHugCanceled = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/HugCanceled"));
|
|
||||||
_onWallHanging = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/Hanging"));
|
_onWallHanging = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/Hanging"));
|
||||||
|
_onWallRunning = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/Running"));
|
||||||
// State timers
|
// State timers
|
||||||
_powerCooldownTimer = GetNode<Timer>("PowerCooldown");
|
_powerCooldownTimer = GetNode<Timer>("PowerCooldown");
|
||||||
_timeScaleAimInAirTimer = GetNode<Timer>("TimeScaleAimInAir");
|
_timeScaleAimInAirTimer = GetNode<Timer>("TimeScaleAimInAir");
|
||||||
@@ -329,7 +335,9 @@ public partial class PlayerController : CharacterBody3D
|
|||||||
Stamina.SetSpeeds(WalkSpeed, WalkSpeed);
|
Stamina.SetSpeeds(WalkSpeed, WalkSpeed);
|
||||||
|
|
||||||
EmpoweredActionsLeft = MaxNumberOfEmpoweredActions;
|
EmpoweredActionsLeft = MaxNumberOfEmpoweredActions;
|
||||||
PlaceWeaponForTutorial();
|
|
||||||
|
if (!TutorialDone)
|
||||||
|
PlaceWeaponForTutorial();
|
||||||
|
|
||||||
///////////////////////////
|
///////////////////////////
|
||||||
// Signal setup ///////////
|
// Signal setup ///////////
|
||||||
@@ -374,9 +382,11 @@ public partial class PlayerController : CharacterBody3D
|
|||||||
|
|
||||||
_simpleDashCooldownTimer.Timeout += DashCooldownTimeout;
|
_simpleDashCooldownTimer.Timeout += DashCooldownTimeout;
|
||||||
|
|
||||||
_onWallHugCanceled.StatePhysicsProcessing += HandleAirborne;
|
_onWall.StateEntered += OnWallStarted;
|
||||||
|
_onWall.StateExited += OnWallStopped;
|
||||||
_onWallHugging.StatePhysicsProcessing += HandleWallHugging;
|
_onWallHugging.StatePhysicsProcessing += HandleWallHugging;
|
||||||
_onWallHanging.StatePhysicsProcessing += HandleWallHanging;
|
_onWallHanging.StatePhysicsProcessing += HandleWallHanging;
|
||||||
|
_onWallRunning.StatePhysicsProcessing += HandleWallRunning;
|
||||||
|
|
||||||
_onJumpFromWall.Taken += OnJumpFromWall;
|
_onJumpFromWall.Taken += OnJumpFromWall;
|
||||||
_onMegajumpFromWall.Taken += OnMegajumpFromWall;
|
_onMegajumpFromWall.Taken += OnMegajumpFromWall;
|
||||||
@@ -409,6 +419,7 @@ public partial class PlayerController : CharacterBody3D
|
|||||||
}
|
}
|
||||||
|
|
||||||
_lookSensitivityMultiplier = (float) config.GetValue("InputSettings", "LookSensitivity", 1.0f);
|
_lookSensitivityMultiplier = (float) config.GetValue("InputSettings", "LookSensitivity", 1.0f);
|
||||||
|
_mouseSensitivityMultiplier = (float) config.GetValue("InputSettings", "MouseSensitivity", 1.0f);
|
||||||
_headBobbingMultiplier = (float) config.GetValue("InputSettings", "HeadBobbingWhileWalking", 1.0f);
|
_headBobbingMultiplier = (float) config.GetValue("InputSettings", "HeadBobbingWhileWalking", 1.0f);
|
||||||
_fovChangeMultiplier = (float) config.GetValue("InputSettings", "FovChangeWithSpeed", 1.0f);
|
_fovChangeMultiplier = (float) config.GetValue("InputSettings", "FovChangeWithSpeed", 1.0f);
|
||||||
}
|
}
|
||||||
@@ -418,11 +429,6 @@ public partial class PlayerController : CharacterBody3D
|
|||||||
TutorialDone = true;
|
TutorialDone = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnWallDetected()
|
|
||||||
{
|
|
||||||
FinishPoweredDash();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnGrounded()
|
public void OnGrounded()
|
||||||
{
|
{
|
||||||
_isWallJumpAvailable = true;
|
_isWallJumpAvailable = true;
|
||||||
@@ -443,27 +449,122 @@ public partial class PlayerController : CharacterBody3D
|
|||||||
if (!isOnFloorCustom())
|
if (!isOnFloorCustom())
|
||||||
_playerState.SendEvent("start_falling");
|
_playerState.SendEvent("start_falling");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private float _wallRunSpeedThreshold = 8f;
|
||||||
|
|
||||||
public void HandleAirborne(float delta)
|
public void HandleAirborne(float delta)
|
||||||
{
|
{
|
||||||
MoveInAir(delta);
|
MoveInAir(delta);
|
||||||
if (isOnFloorCustom())
|
if (isOnFloorCustom())
|
||||||
_playerState.SendEvent("grounded");
|
_playerState.SendEvent("grounded");
|
||||||
if (WallHugSystem.IsWallHugging() && Velocity.Y < 0)
|
|
||||||
|
if (!WallHugSystem.IsWallHugging())
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Going upwards, we stay simply airborne
|
||||||
|
if (Velocity.AngleTo(Vector3.Up) < Math.PI / 4)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Should we start a wall run
|
||||||
|
var wallNormal = WallHugSystem.WallHugNormal.UnwrapOr(Vector3.Zero);
|
||||||
|
var hvel = new Vector3(Velocity.X, 0, Velocity.Z);
|
||||||
|
var hvelProjected = hvel.Slide(_wallHugStartNormal);
|
||||||
|
var haveEnoughSpeed = hvelProjected.Length() > _wallRunSpeedThreshold;
|
||||||
|
var isHeadPlanting = Velocity.AngleTo(wallNormal) < Math.PI / 4;
|
||||||
|
var isGoingDownwards = Velocity.AngleTo(Vector3.Down) < Math.PI / 4;
|
||||||
|
if (haveEnoughSpeed && !isHeadPlanting && !isGoingDownwards)
|
||||||
|
{
|
||||||
|
_playerState.SendEvent("wall_run");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If all else fail and we go down, we hug
|
||||||
|
if (Velocity.Y < 0)
|
||||||
_playerState.SendEvent("wall_hug");
|
_playerState.SendEvent("wall_hug");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Vector3 _wallHugStartLocation = Vector3.Zero;
|
||||||
|
private Vector3 _wallHugStartNormal = Vector3.Zero;
|
||||||
|
private Vector3 _wallHugStartProjectedVelocity = Vector3.Zero;
|
||||||
|
|
||||||
|
public void OnWallDetected()
|
||||||
|
{
|
||||||
|
FinishPoweredDash();
|
||||||
|
|
||||||
|
if (!_onWall.Active)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var newWallNormal = WallHugSystem.WallHugNormal.UnwrapOr(Vector3.Up);
|
||||||
|
_wallHugStartNormal = newWallNormal;
|
||||||
|
}
|
||||||
|
|
||||||
|
private float _timeSinceWallStarted;
|
||||||
|
|
||||||
|
public void OnWallStarted()
|
||||||
|
{
|
||||||
|
_wallHugStartNormal = WallHugSystem.WallHugNormal.UnwrapOr(Vector3.Up);
|
||||||
|
_wallHugStartLocation = WallHugSystem.WallHugLocation.UnwrapOr(Vector3.Zero) + _wallHugStartNormal * _playerRadius;
|
||||||
|
_wallHugStartProjectedVelocity = Velocity.Slide(_wallHugStartNormal);
|
||||||
|
_timeSinceWallStarted = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnWallStopped()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public void HandleWallHugging(float delta)
|
public void HandleWallHugging(float delta)
|
||||||
{
|
{
|
||||||
WallHug(delta);
|
WallHug(delta);
|
||||||
if (isOnFloorCustom())
|
if (isOnFloorCustom())
|
||||||
_playerState.SendEvent("grounded");
|
_playerState.SendEvent("grounded");
|
||||||
if (!WallHugSystem.IsWallHugging())
|
if (!WallHugSystem.IsWallHugging())
|
||||||
|
{
|
||||||
_playerState.SendEvent("start_falling");
|
_playerState.SendEvent("start_falling");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public void HandleWallHanging(float delta)
|
public void HandleWallHanging(float delta)
|
||||||
{
|
{
|
||||||
WallHang(delta);
|
WallHang(delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private float _wallRunUpwardVelocity = 10f;
|
||||||
|
|
||||||
|
public void HandleWallRunning(float delta)
|
||||||
|
{
|
||||||
|
_timeSinceWallStarted += delta;
|
||||||
|
|
||||||
|
var hvel = new Vector3(Velocity.X, 0, Velocity.Z);
|
||||||
|
var hvelProjected = hvel.Slide(_wallHugStartNormal);
|
||||||
|
Velocity = hvelProjected + hvelProjected.Length()*Vector3.Up*0.3f/(1+_timeSinceWallStarted);
|
||||||
|
Velocity *= 0.99f;
|
||||||
|
|
||||||
|
// if (CanMantle())
|
||||||
|
// {
|
||||||
|
// MantleToLocation(_plannedMantleLocation.Unwrap());
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (!WallHugSystem.IsWallHugging() || Velocity.Length() < _wallRunSpeedThreshold)
|
||||||
|
{
|
||||||
|
_playerState.SendEvent("start_falling");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void WallHug(float delta)
|
||||||
|
{
|
||||||
|
var hvel = ComputeHVelocity(delta, WallHugHorizontalDeceleration, WallHugHorizontalDeceleration);
|
||||||
|
var hvelProjected = hvel.Slide(_wallHugStartNormal);
|
||||||
|
var vvel = Velocity.Y - (CalculateGravityForce() * delta / WallHugGravityLesseningFactor);
|
||||||
|
vvel = Math.Abs(vvel) > WallHugDownwardMaxSpeed ? -WallHugDownwardMaxSpeed : vvel;
|
||||||
|
Velocity = hvelProjected + vvel*Vector3.Up;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void WallHang(float delta)
|
||||||
|
{
|
||||||
|
Velocity = Vector3.Zero;
|
||||||
|
GlobalPosition = _wallHugStartLocation;
|
||||||
|
}
|
||||||
|
|
||||||
private Option<Vector3> _plannedMantleLocation = Option<Vector3>.None;
|
private Option<Vector3> _plannedMantleLocation = Option<Vector3>.None;
|
||||||
|
|
||||||
// Jump
|
// Jump
|
||||||
@@ -512,20 +613,6 @@ public partial class PlayerController : CharacterBody3D
|
|||||||
OnJumpStarted(MegaJumpStartVelocity);
|
OnJumpStarted(MegaJumpStartVelocity);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void WallHug(float delta)
|
|
||||||
{
|
|
||||||
var hvel = ComputeHVelocity(delta, WallHugHorizontalDeceleration, WallHugHorizontalDeceleration);
|
|
||||||
var vvel = Velocity.Y - (CalculateGravityForce() * delta / WallHugGravityLesseningFactor);
|
|
||||||
vvel = Math.Abs(vvel) > WallHugDownwardMaxSpeed ? -WallHugDownwardMaxSpeed : vvel;
|
|
||||||
Velocity = hvel + vvel*Vector3.Up;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void WallHang(float delta)
|
|
||||||
{
|
|
||||||
Velocity = Vector3.Zero;
|
|
||||||
MoveAndSlide();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ComputeJumpFromWallHSpeed(float jumpStrength)
|
public void ComputeJumpFromWallHSpeed(float jumpStrength)
|
||||||
{
|
{
|
||||||
// if (!_isWallJumpAvailable)
|
// if (!_isWallJumpAvailable)
|
||||||
@@ -533,7 +620,7 @@ public partial class PlayerController : CharacterBody3D
|
|||||||
// _isWallJumpAvailable = false;
|
// _isWallJumpAvailable = false;
|
||||||
// var isLookingTowardsWall = HeadSystem.GetForwardHorizontalVector().Dot(wallNormal) > 0.5;
|
// var isLookingTowardsWall = HeadSystem.GetForwardHorizontalVector().Dot(wallNormal) > 0.5;
|
||||||
// var jumpDirection = isLookingTowardsWall ? Vector3.Up : wallNormal;
|
// var jumpDirection = isLookingTowardsWall ? Vector3.Up : wallNormal;
|
||||||
var wallNormal = WallHugSystem.GetWallNormal().UnwrapOr(Vector3.Up);
|
var wallNormal = WallHugSystem.WallHugNormal.UnwrapOr(Vector3.Up);
|
||||||
var jumpVector = wallNormal * jumpStrength;
|
var jumpVector = wallNormal * jumpStrength;
|
||||||
|
|
||||||
var currentHorizontalVelocity = new Vector2(Velocity.X, Velocity.Z);
|
var currentHorizontalVelocity = new Vector2(Velocity.X, Velocity.Z);
|
||||||
@@ -550,9 +637,21 @@ public partial class PlayerController : CharacterBody3D
|
|||||||
ComputeJumpFromWallHSpeed(WallMegajumpStartVelocity);
|
ComputeJumpFromWallHSpeed(WallMegajumpStartVelocity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void InputDeviceChanged(bool isUsingGamepad)
|
||||||
|
{
|
||||||
|
_isUsingGamepad = isUsingGamepad;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector3 GetMoveInput()
|
||||||
|
{
|
||||||
|
if (_isUsingGamepad)
|
||||||
|
return _inputMove;
|
||||||
|
return _inputMoveKeyboard;
|
||||||
|
}
|
||||||
|
|
||||||
public Vector3 ComputeHVelocity(float delta, float accelerationFactor, float decelerationFactor, Vector3? direction = null)
|
public Vector3 ComputeHVelocity(float delta, float accelerationFactor, float decelerationFactor, Vector3? direction = null)
|
||||||
{
|
{
|
||||||
var dir = direction ?? Transform.Basis * HeadSystem.Transform.Basis * _inputMove;
|
var dir = direction ?? Transform.Basis * HeadSystem.Transform.Basis * GetMoveInput();
|
||||||
|
|
||||||
var acceleration = dir.Length() > 0 ? accelerationFactor : decelerationFactor;
|
var acceleration = dir.Length() > 0 ? accelerationFactor : decelerationFactor;
|
||||||
|
|
||||||
@@ -654,6 +753,12 @@ public partial class PlayerController : CharacterBody3D
|
|||||||
///////////////////////////
|
///////////////////////////
|
||||||
// Input Management ///////
|
// Input Management ///////
|
||||||
///////////////////////////
|
///////////////////////////
|
||||||
|
|
||||||
|
public void OnInputMoveKeyboard(Vector3 value)
|
||||||
|
{
|
||||||
|
_inputMoveKeyboard = value;
|
||||||
|
}
|
||||||
|
|
||||||
public void OnInputMove(Vector3 value)
|
public void OnInputMove(Vector3 value)
|
||||||
{
|
{
|
||||||
_inputMove = value;
|
_inputMove = value;
|
||||||
@@ -911,13 +1016,13 @@ public partial class PlayerController : CharacterBody3D
|
|||||||
|
|
||||||
public Vector3 GetInputGlobalHDirection()
|
public Vector3 GetInputGlobalHDirection()
|
||||||
{
|
{
|
||||||
var direction = Transform.Basis * HeadSystem.Transform.Basis * _inputMove;
|
var direction = Transform.Basis * HeadSystem.Transform.Basis * GetMoveInput();
|
||||||
return new Vector3(direction.X, 0, direction.Z).Normalized();
|
return new Vector3(direction.X, 0, direction.Z).Normalized();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vector3 GetInputLocalHDirection()
|
public Vector3 GetInputLocalHDirection()
|
||||||
{
|
{
|
||||||
var direction = _inputMove;
|
var direction = GetMoveInput();
|
||||||
return new Vector3(direction.X, 0, direction.Z).Normalized();
|
return new Vector3(direction.X, 0, direction.Z).Normalized();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -997,7 +1102,8 @@ public partial class PlayerController : CharacterBody3D
|
|||||||
private void LookAround()
|
private void LookAround()
|
||||||
{
|
{
|
||||||
Vector2 inputLookDir = new Vector2(_inputRotateY, _inputRotateFloorplane);
|
Vector2 inputLookDir = new Vector2(_inputRotateY, _inputRotateFloorplane);
|
||||||
HeadSystem.LookAround(inputLookDir, _lookSensitivityMultiplier);
|
var lookSensitivity = _isUsingGamepad ? _lookSensitivityMultiplier : _mouseSensitivityMultiplier;
|
||||||
|
HeadSystem.LookAround(inputLookDir, lookSensitivity);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void MoveOnGround(double delta)
|
public void MoveOnGround(double delta)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_resource type="Resource" script_class="GUIDEMappingContext" load_steps=102 format=3 uid="uid://bl5crtu1gkrtr"]
|
[gd_resource type="Resource" script_class="GUIDEMappingContext" load_steps=155 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"]
|
||||||
@@ -12,13 +12,16 @@
|
|||||||
[ext_resource type="Script" uid="uid://bbhoxsiqwo07l" path="res://addons/guide/inputs/guide_input_joy_axis_1d.gd" id="10_cvxqo"]
|
[ext_resource type="Script" uid="uid://bbhoxsiqwo07l" path="res://addons/guide/inputs/guide_input_joy_axis_1d.gd" id="10_cvxqo"]
|
||||||
[ext_resource type="Script" uid="uid://bjm4myqxg4phm" path="res://addons/guide/modifiers/guide_modifier_scale.gd" id="11_j3axn"]
|
[ext_resource type="Script" uid="uid://bjm4myqxg4phm" path="res://addons/guide/modifiers/guide_modifier_scale.gd" id="11_j3axn"]
|
||||||
[ext_resource type="Script" uid="uid://ckggy40lm0vjc" path="res://addons/guide/modifiers/guide_modifier_negate.gd" id="12_kxb2c"]
|
[ext_resource type="Script" uid="uid://ckggy40lm0vjc" path="res://addons/guide/modifiers/guide_modifier_negate.gd" id="12_kxb2c"]
|
||||||
|
[ext_resource type="Script" uid="uid://b6bwb7ie85kl1" path="res://addons/guide/inputs/guide_input_mouse_axis_1d.gd" id="13_j3axn"]
|
||||||
[ext_resource type="Resource" uid="uid://ccrb5xsnphc8" path="res://systems/inputs/base_mode/rotate_floorplane.tres" id="13_v2ywt"]
|
[ext_resource type="Resource" uid="uid://ccrb5xsnphc8" path="res://systems/inputs/base_mode/rotate_floorplane.tres" id="13_v2ywt"]
|
||||||
[ext_resource type="Resource" uid="uid://c3e0ivgaxrsyb" path="res://systems/inputs/base_mode/aim_down.tres" id="14_yp12v"]
|
[ext_resource type="Resource" uid="uid://c3e0ivgaxrsyb" path="res://systems/inputs/base_mode/aim_down.tres" id="14_yp12v"]
|
||||||
[ext_resource type="Script" uid="uid://b52rqq28tuqpg" path="res://addons/guide/triggers/guide_trigger_pressed.gd" id="15_fykw6"]
|
[ext_resource type="Script" uid="uid://b52rqq28tuqpg" path="res://addons/guide/triggers/guide_trigger_pressed.gd" id="15_fykw6"]
|
||||||
[ext_resource type="Script" uid="uid://b4cdrn4paoj3i" path="res://addons/guide/triggers/guide_trigger_down.gd" id="15_g6bbx"]
|
[ext_resource type="Script" uid="uid://b4cdrn4paoj3i" path="res://addons/guide/triggers/guide_trigger_down.gd" id="15_g6bbx"]
|
||||||
|
[ext_resource type="Script" uid="uid://cgy4anjdob2tp" path="res://addons/guide/modifiers/guide_modifier_window_relative.gd" id="15_rvpjj"]
|
||||||
[ext_resource type="Resource" uid="uid://b334rau1yxmm7" path="res://systems/inputs/base_mode/empower_down.tres" id="16_0qat1"]
|
[ext_resource type="Resource" uid="uid://b334rau1yxmm7" path="res://systems/inputs/base_mode/empower_down.tres" id="16_0qat1"]
|
||||||
[ext_resource type="Resource" uid="uid://bebstkm608wxx" path="res://systems/inputs/base_mode/aim_pressed.tres" id="16_li5ak"]
|
[ext_resource type="Resource" uid="uid://bebstkm608wxx" path="res://systems/inputs/base_mode/aim_pressed.tres" id="16_li5ak"]
|
||||||
[ext_resource type="Resource" uid="uid://j1o5ud0plk4" path="res://systems/inputs/base_mode/aim_release.tres" id="16_rvpjj"]
|
[ext_resource type="Resource" uid="uid://j1o5ud0plk4" path="res://systems/inputs/base_mode/aim_release.tres" id="16_rvpjj"]
|
||||||
|
[ext_resource type="Script" uid="uid://vgjlx6p007lp" path="res://addons/guide/inputs/guide_input_mouse_button.gd" id="17_kxb2c"]
|
||||||
[ext_resource type="Script" uid="uid://biiggjw6tv4uq" path="res://addons/guide/triggers/guide_trigger_released.gd" id="17_s8kjn"]
|
[ext_resource type="Script" uid="uid://biiggjw6tv4uq" path="res://addons/guide/triggers/guide_trigger_released.gd" id="17_s8kjn"]
|
||||||
[ext_resource type="Resource" uid="uid://7wm8ywvujwf" path="res://systems/inputs/base_mode/aim_cancel.tres" id="18_vibkn"]
|
[ext_resource type="Resource" uid="uid://7wm8ywvujwf" path="res://systems/inputs/base_mode/aim_cancel.tres" id="18_vibkn"]
|
||||||
[ext_resource type="Resource" uid="uid://bbce5wfwxpns1" path="res://systems/inputs/base_mode/empower_release.tres" id="19_li5ak"]
|
[ext_resource type="Resource" uid="uid://bbce5wfwxpns1" path="res://systems/inputs/base_mode/empower_release.tres" id="19_li5ak"]
|
||||||
@@ -31,6 +34,10 @@
|
|||||||
[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"]
|
||||||
|
[ext_resource type="Resource" uid="uid://s1l0n1iitc6m" path="res://systems/inputs/base_mode/move_back.tres" id="33_fykw6"]
|
||||||
|
[ext_resource type="Resource" uid="uid://brswsknpgwal2" path="res://systems/inputs/base_mode/move_front.tres" id="34_rvpjj"]
|
||||||
|
[ext_resource type="Resource" uid="uid://f3vs6l4m623s" path="res://systems/inputs/base_mode/move_left.tres" id="35_s8kjn"]
|
||||||
|
[ext_resource type="Resource" uid="uid://t612lts1wi1s" path="res://systems/inputs/base_mode/move_right.tres" id="36_vibkn"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_vkvga"]
|
[sub_resource type="Resource" id="Resource_vkvga"]
|
||||||
script = ExtResource("4_1rw8g")
|
script = ExtResource("4_1rw8g")
|
||||||
@@ -73,10 +80,24 @@ script = ExtResource("3_yp12v")
|
|||||||
input = SubResource("Resource_05q5j")
|
input = SubResource("Resource_05q5j")
|
||||||
modifiers = Array[ExtResource("5_0qat1")]([SubResource("Resource_tn8ci"), SubResource("Resource_1koh7"), SubResource("Resource_eep0a")])
|
modifiers = Array[ExtResource("5_0qat1")]([SubResource("Resource_tn8ci"), SubResource("Resource_1koh7"), SubResource("Resource_eep0a")])
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_mfl87"]
|
||||||
|
script = ExtResource("13_j3axn")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_1n4k0"]
|
||||||
|
script = ExtResource("15_rvpjj")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_ukc1w"]
|
||||||
|
script = ExtResource("12_kxb2c")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_4pf65"]
|
||||||
|
script = ExtResource("3_yp12v")
|
||||||
|
input = SubResource("Resource_mfl87")
|
||||||
|
modifiers = Array[ExtResource("5_0qat1")]([SubResource("Resource_1n4k0"), SubResource("Resource_ukc1w")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_tgr2g"]
|
[sub_resource type="Resource" id="Resource_tgr2g"]
|
||||||
script = ExtResource("1_qmhk6")
|
script = ExtResource("1_qmhk6")
|
||||||
action = ExtResource("9_q86qg")
|
action = ExtResource("9_q86qg")
|
||||||
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_dew8i")])
|
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_dew8i"), SubResource("Resource_4pf65")])
|
||||||
metadata/_guide_input_mappings_collapsed = false
|
metadata/_guide_input_mappings_collapsed = false
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_pf0ii"]
|
[sub_resource type="Resource" id="Resource_pf0ii"]
|
||||||
@@ -98,10 +119,25 @@ script = ExtResource("3_yp12v")
|
|||||||
input = SubResource("Resource_pf0ii")
|
input = SubResource("Resource_pf0ii")
|
||||||
modifiers = Array[ExtResource("5_0qat1")]([SubResource("Resource_nh7x4"), SubResource("Resource_04n84"), SubResource("Resource_m3aj7")])
|
modifiers = Array[ExtResource("5_0qat1")]([SubResource("Resource_nh7x4"), SubResource("Resource_04n84"), SubResource("Resource_m3aj7")])
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_2ioub"]
|
||||||
|
script = ExtResource("13_j3axn")
|
||||||
|
axis = 1
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_fvpbi"]
|
||||||
|
script = ExtResource("12_kxb2c")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_7l3h2"]
|
||||||
|
script = ExtResource("15_rvpjj")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_fyd0i"]
|
||||||
|
script = ExtResource("3_yp12v")
|
||||||
|
input = SubResource("Resource_2ioub")
|
||||||
|
modifiers = Array[ExtResource("5_0qat1")]([SubResource("Resource_fvpbi"), SubResource("Resource_7l3h2")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_iarn8"]
|
[sub_resource type="Resource" id="Resource_iarn8"]
|
||||||
script = ExtResource("1_qmhk6")
|
script = ExtResource("1_qmhk6")
|
||||||
action = ExtResource("13_v2ywt")
|
action = ExtResource("13_v2ywt")
|
||||||
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_qu2wi")])
|
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_qu2wi"), SubResource("Resource_fyd0i")])
|
||||||
metadata/_guide_input_mappings_collapsed = false
|
metadata/_guide_input_mappings_collapsed = false
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_si4d4"]
|
[sub_resource type="Resource" id="Resource_si4d4"]
|
||||||
@@ -116,10 +152,22 @@ script = ExtResource("3_yp12v")
|
|||||||
input = SubResource("Resource_si4d4")
|
input = SubResource("Resource_si4d4")
|
||||||
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_2tfaw")])
|
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_2tfaw")])
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_o031f"]
|
||||||
|
script = ExtResource("17_kxb2c")
|
||||||
|
button = 2
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_3s858"]
|
||||||
|
script = ExtResource("15_g6bbx")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_wh232"]
|
||||||
|
script = ExtResource("3_yp12v")
|
||||||
|
input = SubResource("Resource_o031f")
|
||||||
|
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_3s858")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_cvxqo"]
|
[sub_resource type="Resource" id="Resource_cvxqo"]
|
||||||
script = ExtResource("1_qmhk6")
|
script = ExtResource("1_qmhk6")
|
||||||
action = ExtResource("14_yp12v")
|
action = ExtResource("14_yp12v")
|
||||||
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_q86qg")])
|
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_q86qg"), SubResource("Resource_wh232")])
|
||||||
metadata/_guide_input_mappings_collapsed = false
|
metadata/_guide_input_mappings_collapsed = false
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_llfhp"]
|
[sub_resource type="Resource" id="Resource_llfhp"]
|
||||||
@@ -134,10 +182,22 @@ script = ExtResource("3_yp12v")
|
|||||||
input = SubResource("Resource_llfhp")
|
input = SubResource("Resource_llfhp")
|
||||||
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_ib0yi")])
|
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_ib0yi")])
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_xh105"]
|
||||||
|
script = ExtResource("17_kxb2c")
|
||||||
|
button = 2
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_30oue"]
|
||||||
|
script = ExtResource("15_fykw6")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_2supu"]
|
||||||
|
script = ExtResource("3_yp12v")
|
||||||
|
input = SubResource("Resource_xh105")
|
||||||
|
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_30oue")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_tb8ii"]
|
[sub_resource type="Resource" id="Resource_tb8ii"]
|
||||||
script = ExtResource("1_qmhk6")
|
script = ExtResource("1_qmhk6")
|
||||||
action = ExtResource("16_li5ak")
|
action = ExtResource("16_li5ak")
|
||||||
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_r6kml")])
|
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_r6kml"), SubResource("Resource_2supu")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_cqc4k"]
|
[sub_resource type="Resource" id="Resource_cqc4k"]
|
||||||
script = ExtResource("10_cvxqo")
|
script = ExtResource("10_cvxqo")
|
||||||
@@ -151,10 +211,22 @@ script = ExtResource("3_yp12v")
|
|||||||
input = SubResource("Resource_cqc4k")
|
input = SubResource("Resource_cqc4k")
|
||||||
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_vanwy")])
|
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_vanwy")])
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_omo75"]
|
||||||
|
script = ExtResource("17_kxb2c")
|
||||||
|
button = 2
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_npyga"]
|
||||||
|
script = ExtResource("17_s8kjn")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_yxj6r"]
|
||||||
|
script = ExtResource("3_yp12v")
|
||||||
|
input = SubResource("Resource_omo75")
|
||||||
|
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_npyga")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_iihs4"]
|
[sub_resource type="Resource" id="Resource_iihs4"]
|
||||||
script = ExtResource("1_qmhk6")
|
script = ExtResource("1_qmhk6")
|
||||||
action = ExtResource("16_rvpjj")
|
action = ExtResource("16_rvpjj")
|
||||||
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_bkx7d")])
|
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_bkx7d"), SubResource("Resource_yxj6r")])
|
||||||
metadata/_guide_input_mappings_collapsed = false
|
metadata/_guide_input_mappings_collapsed = false
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_fykw6"]
|
[sub_resource type="Resource" id="Resource_fykw6"]
|
||||||
@@ -221,10 +293,22 @@ input = SubResource("Resource_1fkas")
|
|||||||
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_6pxii")])
|
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_6pxii")])
|
||||||
metadata/_guide_triggers_collapsed = false
|
metadata/_guide_triggers_collapsed = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_pv160"]
|
||||||
|
script = ExtResource("30_cvxqo")
|
||||||
|
key = 32
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_ra6lx"]
|
||||||
|
script = ExtResource("15_fykw6")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_q44n6"]
|
||||||
|
script = ExtResource("3_yp12v")
|
||||||
|
input = SubResource("Resource_pv160")
|
||||||
|
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_ra6lx")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_d2r0d"]
|
[sub_resource type="Resource" id="Resource_d2r0d"]
|
||||||
script = ExtResource("1_qmhk6")
|
script = ExtResource("1_qmhk6")
|
||||||
action = ExtResource("25_si4d4")
|
action = ExtResource("25_si4d4")
|
||||||
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_jy4f1")])
|
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_jy4f1"), SubResource("Resource_q44n6")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_oapce"]
|
[sub_resource type="Resource" id="Resource_oapce"]
|
||||||
script = ExtResource("19_qkgmj")
|
script = ExtResource("19_qkgmj")
|
||||||
@@ -234,10 +318,18 @@ script = ExtResource("3_yp12v")
|
|||||||
input = SubResource("Resource_oapce")
|
input = SubResource("Resource_oapce")
|
||||||
metadata/_guide_triggers_collapsed = false
|
metadata/_guide_triggers_collapsed = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_assli"]
|
||||||
|
script = ExtResource("30_cvxqo")
|
||||||
|
key = 32
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_x5v0d"]
|
||||||
|
script = ExtResource("3_yp12v")
|
||||||
|
input = SubResource("Resource_assli")
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_xt1x5"]
|
[sub_resource type="Resource" id="Resource_xt1x5"]
|
||||||
script = ExtResource("1_qmhk6")
|
script = ExtResource("1_qmhk6")
|
||||||
action = ExtResource("21_818lq")
|
action = ExtResource("21_818lq")
|
||||||
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_8w5gu")])
|
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_8w5gu"), SubResource("Resource_x5v0d")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_li5ak"]
|
[sub_resource type="Resource" id="Resource_li5ak"]
|
||||||
script = ExtResource("19_qkgmj")
|
script = ExtResource("19_qkgmj")
|
||||||
@@ -251,10 +343,21 @@ script = ExtResource("3_yp12v")
|
|||||||
input = SubResource("Resource_li5ak")
|
input = SubResource("Resource_li5ak")
|
||||||
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_paxxe")])
|
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_paxxe")])
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_pdblu"]
|
||||||
|
script = ExtResource("17_kxb2c")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_q0e5d"]
|
||||||
|
script = ExtResource("15_fykw6")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_a8sqk"]
|
||||||
|
script = ExtResource("3_yp12v")
|
||||||
|
input = SubResource("Resource_pdblu")
|
||||||
|
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_q0e5d")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_ew1hw"]
|
[sub_resource type="Resource" id="Resource_ew1hw"]
|
||||||
script = ExtResource("1_qmhk6")
|
script = ExtResource("1_qmhk6")
|
||||||
action = ExtResource("22_2hs2y")
|
action = ExtResource("22_2hs2y")
|
||||||
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_500v3")])
|
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_500v3"), SubResource("Resource_a8sqk")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_g6bbx"]
|
[sub_resource type="Resource" id="Resource_g6bbx"]
|
||||||
script = ExtResource("19_qkgmj")
|
script = ExtResource("19_qkgmj")
|
||||||
@@ -268,10 +371,46 @@ script = ExtResource("3_yp12v")
|
|||||||
input = SubResource("Resource_g6bbx")
|
input = SubResource("Resource_g6bbx")
|
||||||
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_yp12v")])
|
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_yp12v")])
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_xbeov"]
|
||||||
|
script = ExtResource("30_cvxqo")
|
||||||
|
key = 4194325
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_rt8uw"]
|
||||||
|
script = ExtResource("15_fykw6")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_hj46p"]
|
||||||
|
script = ExtResource("3_yp12v")
|
||||||
|
input = SubResource("Resource_xbeov")
|
||||||
|
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_rt8uw")])
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_jk2g8"]
|
||||||
|
script = ExtResource("30_cvxqo")
|
||||||
|
key = 70
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_wcvib"]
|
||||||
|
script = ExtResource("15_fykw6")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_imjft"]
|
||||||
|
script = ExtResource("3_yp12v")
|
||||||
|
input = SubResource("Resource_jk2g8")
|
||||||
|
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_wcvib")])
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_kx31q"]
|
||||||
|
script = ExtResource("30_cvxqo")
|
||||||
|
key = 4194326
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_oux88"]
|
||||||
|
script = ExtResource("15_fykw6")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_b7w5s"]
|
||||||
|
script = ExtResource("3_yp12v")
|
||||||
|
input = SubResource("Resource_kx31q")
|
||||||
|
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_oux88")])
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_0qat1"]
|
[sub_resource type="Resource" id="Resource_0qat1"]
|
||||||
script = ExtResource("1_qmhk6")
|
script = ExtResource("1_qmhk6")
|
||||||
action = ExtResource("23_g6bbx")
|
action = ExtResource("23_g6bbx")
|
||||||
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_1rw8g")])
|
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_1rw8g"), SubResource("Resource_hj46p"), SubResource("Resource_imjft"), SubResource("Resource_b7w5s")])
|
||||||
metadata/_guide_input_mappings_collapsed = false
|
metadata/_guide_input_mappings_collapsed = false
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_j3axn"]
|
[sub_resource type="Resource" id="Resource_j3axn"]
|
||||||
@@ -333,7 +472,59 @@ action = ExtResource("29_q86qg")
|
|||||||
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_ai85f"), SubResource("Resource_1ycft"), SubResource("Resource_k8i2y")])
|
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_ai85f"), SubResource("Resource_1ycft"), SubResource("Resource_k8i2y")])
|
||||||
metadata/_guide_input_mappings_collapsed = false
|
metadata/_guide_input_mappings_collapsed = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_kcylj"]
|
||||||
|
script = ExtResource("30_cvxqo")
|
||||||
|
key = 83
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_yq6lj"]
|
||||||
|
script = ExtResource("3_yp12v")
|
||||||
|
input = SubResource("Resource_kcylj")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_fjku4"]
|
||||||
|
script = ExtResource("1_qmhk6")
|
||||||
|
action = ExtResource("33_fykw6")
|
||||||
|
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_yq6lj")])
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_wt677"]
|
||||||
|
script = ExtResource("30_cvxqo")
|
||||||
|
key = 87
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_ly2iy"]
|
||||||
|
script = ExtResource("3_yp12v")
|
||||||
|
input = SubResource("Resource_wt677")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_odnhd"]
|
||||||
|
script = ExtResource("1_qmhk6")
|
||||||
|
action = ExtResource("34_rvpjj")
|
||||||
|
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_ly2iy")])
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_i62p1"]
|
||||||
|
script = ExtResource("30_cvxqo")
|
||||||
|
key = 65
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_3d0gd"]
|
||||||
|
script = ExtResource("3_yp12v")
|
||||||
|
input = SubResource("Resource_i62p1")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_0eff7"]
|
||||||
|
script = ExtResource("1_qmhk6")
|
||||||
|
action = ExtResource("35_s8kjn")
|
||||||
|
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_3d0gd")])
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_uqqnm"]
|
||||||
|
script = ExtResource("30_cvxqo")
|
||||||
|
key = 68
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_7io5e"]
|
||||||
|
script = ExtResource("3_yp12v")
|
||||||
|
input = SubResource("Resource_uqqnm")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_gt77e"]
|
||||||
|
script = ExtResource("1_qmhk6")
|
||||||
|
action = ExtResource("36_vibkn")
|
||||||
|
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_7io5e")])
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("23_llfhp")
|
script = ExtResource("23_llfhp")
|
||||||
mappings = Array[ExtResource("1_qmhk6")]([SubResource("Resource_88x08"), SubResource("Resource_tgr2g"), SubResource("Resource_iarn8"), SubResource("Resource_cvxqo"), SubResource("Resource_tb8ii"), SubResource("Resource_iihs4"), SubResource("Resource_vibkn"), SubResource("Resource_2hs2y"), SubResource("Resource_0s4kt"), SubResource("Resource_d2r0d"), SubResource("Resource_xt1x5"), SubResource("Resource_ew1hw"), SubResource("Resource_0qat1"), SubResource("Resource_vtk18"), SubResource("Resource_weyro")])
|
mappings = Array[ExtResource("1_qmhk6")]([SubResource("Resource_88x08"), SubResource("Resource_tgr2g"), SubResource("Resource_iarn8"), SubResource("Resource_cvxqo"), SubResource("Resource_tb8ii"), SubResource("Resource_iihs4"), SubResource("Resource_vibkn"), SubResource("Resource_2hs2y"), SubResource("Resource_0s4kt"), SubResource("Resource_d2r0d"), SubResource("Resource_xt1x5"), SubResource("Resource_ew1hw"), SubResource("Resource_0qat1"), SubResource("Resource_vtk18"), SubResource("Resource_weyro"), SubResource("Resource_fjku4"), SubResource("Resource_odnhd"), SubResource("Resource_0eff7"), SubResource("Resource_gt77e")])
|
||||||
metadata/_custom_type_script = "uid://dsa1dnifd6w32"
|
metadata/_custom_type_script = "uid://dsa1dnifd6w32"
|
||||||
|
|||||||
8
systems/inputs/base_mode/move_back.tres
Normal file
8
systems/inputs/base_mode/move_back.tres
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[gd_resource type="Resource" script_class="GUIDEAction" load_steps=2 format=3 uid="uid://s1l0n1iitc6m"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cluhc11vixkf1" path="res://addons/guide/guide_action.gd" id="1_7ljxs"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_7ljxs")
|
||||||
|
action_value_type = 1
|
||||||
|
metadata/_custom_type_script = "uid://cluhc11vixkf1"
|
||||||
8
systems/inputs/base_mode/move_front.tres
Normal file
8
systems/inputs/base_mode/move_front.tres
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[gd_resource type="Resource" script_class="GUIDEAction" load_steps=2 format=3 uid="uid://brswsknpgwal2"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cluhc11vixkf1" path="res://addons/guide/guide_action.gd" id="1_6kcci"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_6kcci")
|
||||||
|
action_value_type = 1
|
||||||
|
metadata/_custom_type_script = "uid://cluhc11vixkf1"
|
||||||
8
systems/inputs/base_mode/move_left.tres
Normal file
8
systems/inputs/base_mode/move_left.tres
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[gd_resource type="Resource" script_class="GUIDEAction" load_steps=2 format=3 uid="uid://f3vs6l4m623s"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cluhc11vixkf1" path="res://addons/guide/guide_action.gd" id="1_u1qdq"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_u1qdq")
|
||||||
|
action_value_type = 1
|
||||||
|
metadata/_custom_type_script = "uid://cluhc11vixkf1"
|
||||||
8
systems/inputs/base_mode/move_right.tres
Normal file
8
systems/inputs/base_mode/move_right.tres
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[gd_resource type="Resource" script_class="GUIDEAction" load_steps=2 format=3 uid="uid://t612lts1wi1s"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cluhc11vixkf1" path="res://addons/guide/guide_action.gd" id="1_gd7dq"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_gd7dq")
|
||||||
|
action_value_type = 1
|
||||||
|
metadata/_custom_type_script = "uid://cluhc11vixkf1"
|
||||||
@@ -6,6 +6,10 @@ class_name InputController
|
|||||||
|
|
||||||
@export_group("Move actions")
|
@export_group("Move actions")
|
||||||
@export var move:GUIDEAction
|
@export var move:GUIDEAction
|
||||||
|
@export var move_left:GUIDEAction
|
||||||
|
@export var move_right:GUIDEAction
|
||||||
|
@export var move_front:GUIDEAction
|
||||||
|
@export var move_back:GUIDEAction
|
||||||
@export var rotate_y:GUIDEAction
|
@export var rotate_y:GUIDEAction
|
||||||
@export var rotate_floorplane:GUIDEAction
|
@export var rotate_floorplane:GUIDEAction
|
||||||
|
|
||||||
@@ -25,9 +29,13 @@ class_name InputController
|
|||||||
@export var dash:GUIDEAction
|
@export var dash:GUIDEAction
|
||||||
@export var throw:GUIDEAction
|
@export var throw:GUIDEAction
|
||||||
|
|
||||||
|
signal input_device_changed(is_gamepad: bool)
|
||||||
|
var _using_gamepad = false
|
||||||
|
|
||||||
signal input_move(value: Vector3)
|
signal input_move(value: Vector3)
|
||||||
signal input_rotate_y(value: float)
|
signal input_rotate_y(value: float)
|
||||||
signal input_rotate_floorplane(value: float)
|
signal input_rotate_floorplane(value: float)
|
||||||
|
signal input_move_keyboard(value: Vector3)
|
||||||
|
|
||||||
# Jump
|
# Jump
|
||||||
signal input_jump_started
|
signal input_jump_started
|
||||||
@@ -100,7 +108,27 @@ func on_input_empower_released():
|
|||||||
func on_input_aim_canceled():
|
func on_input_aim_canceled():
|
||||||
input_aim_canceled.emit()
|
input_aim_canceled.emit()
|
||||||
|
|
||||||
|
func _input(event: InputEvent) -> void:
|
||||||
|
if event is InputEventKey:
|
||||||
|
if _using_gamepad:
|
||||||
|
_using_gamepad = false
|
||||||
|
input_device_changed.emit(_using_gamepad)
|
||||||
|
elif event is InputEventJoypadMotion:
|
||||||
|
if !_using_gamepad:
|
||||||
|
if abs(event.axis_value) > 0.5:
|
||||||
|
_using_gamepad = true
|
||||||
|
input_device_changed.emit(_using_gamepad)
|
||||||
|
elif event is InputEventJoypadButton:
|
||||||
|
if !_using_gamepad:
|
||||||
|
_using_gamepad = true
|
||||||
|
input_device_changed.emit(_using_gamepad)
|
||||||
|
|
||||||
func _process(_delta: float) -> void:
|
func _process(_delta: float) -> void:
|
||||||
|
var value_horizontal = -move_left.value_axis_1d + move_right.value_axis_1d
|
||||||
|
var value_vertical = -move_front.value_axis_1d + move_back.value_axis_1d
|
||||||
|
var keyboard_input_vector = Vector3(value_horizontal, 0, value_vertical)
|
||||||
|
|
||||||
|
input_move_keyboard.emit(keyboard_input_vector)
|
||||||
input_move.emit(move.value_axis_3d)
|
input_move.emit(move.value_axis_3d)
|
||||||
input_rotate_y.emit(rotate_y.value_axis_1d)
|
input_rotate_y.emit(rotate_y.value_axis_1d)
|
||||||
input_rotate_floorplane.emit(rotate_floorplane.value_axis_1d)
|
input_rotate_floorplane.emit(rotate_floorplane.value_axis_1d)
|
||||||
|
|||||||
@@ -12,44 +12,47 @@ public partial class WallHugSystem : Node3D
|
|||||||
public delegate void WallDetectedEventHandler();
|
public delegate void WallDetectedEventHandler();
|
||||||
|
|
||||||
private List<RayCast3D> _raycasts;
|
private List<RayCast3D> _raycasts;
|
||||||
|
public Option<Vector3> WallHugLocation { get; private set; } = Option<Vector3>.None;
|
||||||
|
public Option<Vector3> WallHugNormal { get; private set; } = Option<Vector3>.None;
|
||||||
|
|
||||||
public void Init()
|
public void Init()
|
||||||
{
|
{
|
||||||
_raycasts = new List<RayCast3D>();
|
_raycasts = new List<RayCast3D>();
|
||||||
_raycasts.Add(GetNode<RayCast3D>("front"));
|
_raycasts.Add(GetNode<RayCast3D>("front"));
|
||||||
|
_raycasts.Add(GetNode<RayCast3D>("front2"));
|
||||||
_raycasts.Add(GetNode<RayCast3D>("back"));
|
_raycasts.Add(GetNode<RayCast3D>("back"));
|
||||||
|
_raycasts.Add(GetNode<RayCast3D>("back2"));
|
||||||
_raycasts.Add(GetNode<RayCast3D>("left"));
|
_raycasts.Add(GetNode<RayCast3D>("left"));
|
||||||
|
_raycasts.Add(GetNode<RayCast3D>("left2"));
|
||||||
_raycasts.Add(GetNode<RayCast3D>("right"));
|
_raycasts.Add(GetNode<RayCast3D>("right"));
|
||||||
|
_raycasts.Add(GetNode<RayCast3D>("right2"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void _PhysicsProcess(double delta)
|
public override void _PhysicsProcess(double delta)
|
||||||
{
|
{
|
||||||
base._PhysicsProcess(delta);
|
base._PhysicsProcess(delta);
|
||||||
|
CheckWallHugging();
|
||||||
if (IsWallHugging())
|
if (IsWallHugging())
|
||||||
EmitSignal(SignalName.WallDetected);
|
EmitSignal(SignalName.WallDetected);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsWallHugging()
|
public void CheckWallHugging()
|
||||||
{
|
{
|
||||||
foreach (RayCast3D raycast in _raycasts)
|
foreach (RayCast3D raycast in _raycasts)
|
||||||
{
|
{
|
||||||
if (raycast.IsColliding())
|
if (raycast.IsColliding())
|
||||||
{
|
{
|
||||||
return true;
|
WallHugLocation = raycast.GetCollisionPoint().Some();
|
||||||
|
WallHugNormal = raycast.GetCollisionNormal().Some();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
WallHugLocation = Option<Vector3>.None;
|
||||||
|
WallHugNormal = Option<Vector3>.None;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Option<Vector3> GetWallNormal()
|
public bool IsWallHugging()
|
||||||
{
|
{
|
||||||
foreach (RayCast3D raycast in _raycasts)
|
return !WallHugLocation.IsNone;
|
||||||
{
|
|
||||||
if (raycast.IsColliding())
|
|
||||||
{
|
|
||||||
return raycast.GetCollisionNormal().Some();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Option<Vector3>.None;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
16
tools/city_helpers.gd
Normal file
16
tools/city_helpers.gd
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
@tool
|
||||||
|
extends Node3D
|
||||||
|
|
||||||
|
@export_group("Place player")
|
||||||
|
@export_tool_button("Tuto start", "Callable") var player_tuto_start = place_player_tuto_start
|
||||||
|
@export_tool_button("Playground", "Callable") var player_playground = place_player_playground
|
||||||
|
|
||||||
|
@onready var player: CharacterBody3D = $Player
|
||||||
|
|
||||||
|
|
||||||
|
func place_player_tuto_start():
|
||||||
|
player.position = Vector3(0, -132.75, 118)
|
||||||
|
|
||||||
|
func place_player_playground():
|
||||||
|
player.position = Vector3(-6.0, 75.5, -13.5)
|
||||||
|
|
||||||
1
tools/city_helpers.gd.uid
Normal file
1
tools/city_helpers.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://blenis2y55fmg
|
||||||
Reference in New Issue
Block a user