456 lines
13 KiB
Plaintext
Raw Permalink Normal View History

Various enhancements, fixes, and tweaks focused on improving the inspector (#34) * Added Dynamic Gravity Toggle Added an editor toggle for dynamic gravity so users don't need to uncomment code in character.gd. * Refactor controls export variables Changed controls export variables to be a single dictionary so they can be edited completely in the editor without having to open the script. I also refactored the controller support section to allow similar functionality for controller specific controls and removed the need to uncomment/comment out lines of code to turn on/off controller support. * Add more editor descriptions and implement camera axis inversion options Added/tweaked export variable descriptions so everything has one. Also slightly refactored the camera input inversion code and added the ability to invert the camera x axis. * Added direction based landing animations Added some logic to determine which landing animation to play so it's not random anymore. Also added a land_center animation for the case of neutral landings. This can be expanded if desired, but it's pretty convincing as is and is ulitmately a small detail. * Correct various grammar and spelling errors A final pass to clean up any grammatical or spelling errors in the comments * Re-organized Character.gd Hope I'm not overstepping here, but I re-organized Character.gd to make it a bit easier to read and work with. Added editor bookmarks and collapsible code regions. It's hard to parse in the diff so I recommend you look at it in Godot proper. * Commented out debug print statement I assume this was left uncommented by mistake. I was wondering what was printing that to my console. * Fixed Landing Animation Logic I guess I was up too late on my first attempt because it straight up didn't work. This new version works as far as my testing can tell. * Removed some unused variables
2024-10-25 16:30:03 -04:00
[gd_scene load_steps=22 format=3 uid="uid://cc1m2a1obsyn4"]
2023-12-01 22:26:46 -08:00
[ext_resource type="Script" path="res://addons/fpc/character.gd" id="1_0t4e8"]
2024-05-28 20:28:37 -07:00
[ext_resource type="Script" path="res://addons/fpc/EditorModule.gd" id="3_v3ckk"]
2023-12-01 22:26:46 -08:00
[ext_resource type="Script" path="res://addons/fpc/debug.gd" id="3_x1wcc"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_kp17n"]
albedo_color = Color(0.909804, 0.596078, 0, 1)
clearcoat_enabled = true
clearcoat_roughness = 0.2
[sub_resource type="CapsuleMesh" id="CapsuleMesh_jw1de"]
material = SubResource("StandardMaterial3D_kp17n")
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_uy03j"]
2024-03-21 16:02:14 -07:00
[sub_resource type="Animation" id="Animation_j8cx7"]
resource_name = "RESET"
length = 0.001
2024-01-20 14:42:32 -08:00
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Mesh:scale")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
2024-03-21 16:02:14 -07:00
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
2024-01-20 14:42:32 -08:00
"update": 0,
2024-03-21 16:02:14 -07:00
"values": [Vector3(1, 1, 1)]
2024-01-20 14:42:32 -08:00
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Collision:scale")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
2024-03-21 16:02:14 -07:00
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
2024-01-20 14:42:32 -08:00
"update": 0,
2024-03-21 16:02:14 -07:00
"values": [Vector3(1, 1, 1)]
2024-01-20 14:42:32 -08:00
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Mesh:position")
tracks/2/interp = 2
tracks/2/loop_wrap = true
tracks/2/keys = {
2024-03-21 16:02:14 -07:00
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
2024-01-20 14:42:32 -08:00
"update": 0,
2024-03-21 16:02:14 -07:00
"values": [Vector3(0, 1, 0)]
2024-01-20 14:42:32 -08:00
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Collision:position")
tracks/3/interp = 2
tracks/3/loop_wrap = true
tracks/3/keys = {
2024-03-21 16:02:14 -07:00
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
2024-01-20 14:42:32 -08:00
"update": 0,
2024-03-21 16:02:14 -07:00
"values": [Vector3(0, 1, 0)]
2024-01-20 14:42:32 -08:00
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Head:position")
tracks/4/interp = 2
tracks/4/loop_wrap = true
tracks/4/keys = {
2024-03-21 16:02:14 -07:00
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
2024-01-20 14:42:32 -08:00
"update": 0,
2024-03-21 16:02:14 -07:00
"values": [Vector3(0, 1.5, 0)]
2024-01-20 14:42:32 -08:00
}
2024-03-21 16:02:14 -07:00
[sub_resource type="Animation" id="Animation_5ec5e"]
resource_name = "crouch"
length = 0.2
2024-02-29 19:53:23 -08:00
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Mesh:scale")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
2024-03-21 16:02:14 -07:00
"times": PackedFloat32Array(0, 0.2),
"transitions": PackedFloat32Array(1, 1),
2024-02-29 19:53:23 -08:00
"update": 0,
2024-03-21 16:02:14 -07:00
"values": [Vector3(1, 1, 1), Vector3(1, 0.75, 1)]
2024-02-29 19:53:23 -08:00
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Collision:scale")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
2024-03-21 16:02:14 -07:00
"times": PackedFloat32Array(0, 0.2),
"transitions": PackedFloat32Array(1, 1),
2024-02-29 19:53:23 -08:00
"update": 0,
2024-03-21 16:02:14 -07:00
"values": [Vector3(1, 1, 1), Vector3(1, 0.75, 1)]
2024-02-29 19:53:23 -08:00
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Mesh:position")
tracks/2/interp = 2
tracks/2/loop_wrap = true
tracks/2/keys = {
2024-03-21 16:02:14 -07:00
"times": PackedFloat32Array(0, 0.2),
"transitions": PackedFloat32Array(1, 1),
2024-02-29 19:53:23 -08:00
"update": 0,
2024-03-21 16:02:14 -07:00
"values": [Vector3(0, 1, 0), Vector3(0, 0.75, 0)]
2024-02-29 19:53:23 -08:00
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Collision:position")
tracks/3/interp = 2
tracks/3/loop_wrap = true
tracks/3/keys = {
2024-03-21 16:02:14 -07:00
"times": PackedFloat32Array(0, 0.2),
"transitions": PackedFloat32Array(1, 1),
2024-02-29 19:53:23 -08:00
"update": 0,
2024-03-21 16:02:14 -07:00
"values": [Vector3(0, 1, 0), Vector3(0, 0.75, 0)]
2024-02-29 19:53:23 -08:00
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Head:position")
tracks/4/interp = 2
tracks/4/loop_wrap = true
tracks/4/keys = {
2024-03-21 16:02:14 -07:00
"times": PackedFloat32Array(0, 0.2),
"transitions": PackedFloat32Array(1, 1),
2024-02-29 19:53:23 -08:00
"update": 0,
2024-03-21 16:02:14 -07:00
"values": [Vector3(0, 1.5, 0), Vector3(0, 1.12508, 0)]
2024-02-29 19:53:23 -08:00
}
2024-01-20 14:42:32 -08:00
[sub_resource type="AnimationLibrary" id="AnimationLibrary_5e5t5"]
_data = {
2024-02-29 19:53:23 -08:00
"RESET": SubResource("Animation_j8cx7"),
2024-01-20 14:42:32 -08:00
"crouch": SubResource("Animation_5ec5e")
}
2023-12-01 22:26:46 -08:00
[sub_resource type="Animation" id="Animation_gh776"]
resource_name = "RESET"
length = 0.001
loop_mode = 1
2024-01-09 12:51:48 -08:00
tracks/0/type = "bezier"
2023-12-01 22:26:46 -08:00
tracks/0/imported = false
tracks/0/enabled = true
2024-01-09 12:51:48 -08:00
tracks/0/path = NodePath("Camera:position:x")
2023-12-01 22:26:46 -08:00
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
2024-01-09 12:51:48 -08:00
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/1/type = "bezier"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera:position:y")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
2023-12-01 22:26:46 -08:00
2024-03-21 16:02:14 -07:00
[sub_resource type="Animation" id="Animation_8ku67"]
resource_name = "sprint"
2024-01-09 12:51:48 -08:00
length = 2.0
2023-12-01 22:26:46 -08:00
loop_mode = 1
2024-01-09 12:51:48 -08:00
tracks/0/type = "bezier"
2023-12-01 22:26:46 -08:00
tracks/0/imported = false
tracks/0/enabled = true
2024-01-09 12:51:48 -08:00
tracks/0/path = NodePath("Camera:position:x")
tracks/0/interp = 1
2023-12-01 22:26:46 -08:00
tracks/0/loop_wrap = true
tracks/0/keys = {
2024-02-29 19:36:50 -08:00
"handle_modes": PackedInt32Array(0, 1, 0, 1, 0),
2024-03-21 16:02:14 -07:00
"points": PackedFloat32Array(0.06, -0.25, 0, 0.25, -0.01, 0, 0, 0, 0, 0, -0.06, -0.25, 0.01, 0.25, 0.01, 0, 0, 0, 0, 0, 0.06, -0.25, -0.01, 0.25, 0),
2024-01-09 12:51:48 -08:00
"times": PackedFloat32Array(0, 0.5, 1, 1.5, 2)
}
tracks/1/type = "bezier"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera:position:y")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0, 0, 0, 0, 0),
2024-03-21 16:02:14 -07:00
"points": PackedFloat32Array(0.05, -0.25, 0, 0.2, -0.01, 0, -0.2, 0.000186046, 0.2, 0.000186046, 0.05, -0.2, -0.01, 0.2, -0.01, 0, -0.2, 0, 0.2, 0, 0.05, -0.2, -0.01, 0.25, 0),
2024-01-09 12:51:48 -08:00
"times": PackedFloat32Array(0, 0.5, 1, 1.5, 2)
}
2023-12-01 22:26:46 -08:00
2024-03-21 16:02:14 -07:00
[sub_resource type="Animation" id="Animation_lrqmv"]
resource_name = "walk"
2024-02-29 19:36:50 -08:00
length = 2.0
loop_mode = 1
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera:position:x")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0, 1, 0, 1, 0),
2024-03-21 16:02:14 -07:00
"points": PackedFloat32Array(0.04, -0.25, 0, 0.25, 0, 0, 0, 0, 0, 0, -0.04, -0.25, 0, 0.25, 0, 0, 0, 0, 0, 0, 0.04, -0.25, 0, 0.25, 0),
2024-02-29 19:36:50 -08:00
"times": PackedFloat32Array(0, 0.5, 1, 1.5, 2)
}
tracks/1/type = "bezier"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera:position:y")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0, 0, 0, 0, 0),
2024-03-21 16:02:14 -07:00
"points": PackedFloat32Array(-0.05, -0.25, 0, 0.2, 0.005, 0, -0.2, 0.000186046, 0.2, 0.000186046, -0.05, -0.2, 0.005, 0.2, 0.005, 0, -0.2, 0, 0.2, 0, -0.05, -0.2, 0.005, 0.25, 0),
2024-02-29 19:36:50 -08:00
"times": PackedFloat32Array(0, 0.5, 1, 1.5, 2)
}
2023-12-01 22:26:46 -08:00
[sub_resource type="AnimationLibrary" id="AnimationLibrary_o0unb"]
_data = {
"RESET": SubResource("Animation_gh776"),
2024-02-29 19:36:50 -08:00
"sprint": SubResource("Animation_8ku67"),
"walk": SubResource("Animation_lrqmv")
2023-12-01 22:26:46 -08:00
}
2024-01-20 14:42:32 -08:00
[sub_resource type="Animation" id="Animation_fvvjq"]
length = 0.001
2024-01-19 20:31:04 -08:00
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera:rotation")
2024-01-20 14:42:32 -08:00
tracks/0/interp = 1
2024-01-19 20:31:04 -08:00
tracks/0/loop_wrap = true
tracks/0/keys = {
2024-01-20 14:42:32 -08:00
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
2024-01-19 20:31:04 -08:00
"update": 0,
"values": [Vector3(0, 0, 0)]
2024-01-19 20:31:04 -08:00
}
2024-02-29 19:53:23 -08:00
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 0)]
}
2024-01-19 20:31:04 -08:00
2024-01-20 14:42:32 -08:00
[sub_resource type="Animation" id="Animation_s07ye"]
resource_name = "jump"
2024-02-29 19:36:50 -08:00
length = 3.0
2024-01-19 20:31:04 -08:00
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera:rotation")
2024-01-20 14:42:32 -08:00
tracks/0/interp = 2
2024-01-19 20:31:04 -08:00
tracks/0/loop_wrap = true
tracks/0/keys = {
2024-02-29 19:36:50 -08:00
"times": PackedFloat32Array(0, 0.6, 3),
2024-01-20 14:42:32 -08:00
"transitions": PackedFloat32Array(1, 1, 1),
2024-01-19 20:31:04 -08:00
"update": 0,
2024-01-20 14:42:32 -08:00
"values": [Vector3(0, 0, 0), Vector3(0.0349066, 0, 0), Vector3(0, 0, 0)]
2024-01-19 20:31:04 -08:00
}
2024-03-21 16:02:14 -07:00
[sub_resource type="Animation" id="Animation_l1rph"]
resource_name = "land_left"
2024-02-29 19:36:50 -08:00
length = 1.5
2024-01-19 20:31:04 -08:00
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera:rotation")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
2024-02-29 19:36:50 -08:00
"times": PackedFloat32Array(0, 0.5, 1.5),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
2024-03-21 16:02:14 -07:00
"values": [Vector3(0, 0, 0), Vector3(-0.0349066, 0, 0.0174533), Vector3(0, 0, 0)]
2024-02-29 19:36:50 -08:00
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.5, 1.5),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, -0.1, 0), Vector3(0, 0, 0)]
}
2024-03-21 16:02:14 -07:00
[sub_resource type="Animation" id="Animation_vsknp"]
resource_name = "land_right"
2024-02-29 19:36:50 -08:00
length = 1.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera:rotation")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.5, 1.5),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
2024-03-21 16:02:14 -07:00
"values": [Vector3(0, 0, 0), Vector3(-0.0349066, 0, -0.0174533), Vector3(0, 0, 0)]
2024-02-29 19:36:50 -08:00
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.5, 1.5),
2024-01-19 20:31:04 -08:00
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
2024-02-29 19:36:50 -08:00
"values": [Vector3(0, 0, 0), Vector3(0, -0.1, 0), Vector3(0, 0, 0)]
2024-01-19 20:31:04 -08:00
}
Various enhancements, fixes, and tweaks focused on improving the inspector (#34) * Added Dynamic Gravity Toggle Added an editor toggle for dynamic gravity so users don't need to uncomment code in character.gd. * Refactor controls export variables Changed controls export variables to be a single dictionary so they can be edited completely in the editor without having to open the script. I also refactored the controller support section to allow similar functionality for controller specific controls and removed the need to uncomment/comment out lines of code to turn on/off controller support. * Add more editor descriptions and implement camera axis inversion options Added/tweaked export variable descriptions so everything has one. Also slightly refactored the camera input inversion code and added the ability to invert the camera x axis. * Added direction based landing animations Added some logic to determine which landing animation to play so it's not random anymore. Also added a land_center animation for the case of neutral landings. This can be expanded if desired, but it's pretty convincing as is and is ulitmately a small detail. * Correct various grammar and spelling errors A final pass to clean up any grammatical or spelling errors in the comments * Re-organized Character.gd Hope I'm not overstepping here, but I re-organized Character.gd to make it a bit easier to read and work with. Added editor bookmarks and collapsible code regions. It's hard to parse in the diff so I recommend you look at it in Godot proper. * Commented out debug print statement I assume this was left uncommented by mistake. I was wondering what was printing that to my console. * Fixed Landing Animation Logic I guess I was up too late on my first attempt because it straight up didn't work. This new version works as far as my testing can tell. * Removed some unused variables
2024-10-25 16:30:03 -04:00
[sub_resource type="Animation" id="Animation_3eyjl"]
resource_name = "land_center"
length = 1.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera:rotation")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.5, 1.5),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(-0.0349066, 0, 0), Vector3(0, 0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.5, 1.5),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, -0.1, 0), Vector3(0, 0, 0)]
}
2024-01-19 20:31:04 -08:00
[sub_resource type="AnimationLibrary" id="AnimationLibrary_qeg5r"]
_data = {
"RESET": SubResource("Animation_fvvjq"),
"jump": SubResource("Animation_s07ye"),
Various enhancements, fixes, and tweaks focused on improving the inspector (#34) * Added Dynamic Gravity Toggle Added an editor toggle for dynamic gravity so users don't need to uncomment code in character.gd. * Refactor controls export variables Changed controls export variables to be a single dictionary so they can be edited completely in the editor without having to open the script. I also refactored the controller support section to allow similar functionality for controller specific controls and removed the need to uncomment/comment out lines of code to turn on/off controller support. * Add more editor descriptions and implement camera axis inversion options Added/tweaked export variable descriptions so everything has one. Also slightly refactored the camera input inversion code and added the ability to invert the camera x axis. * Added direction based landing animations Added some logic to determine which landing animation to play so it's not random anymore. Also added a land_center animation for the case of neutral landings. This can be expanded if desired, but it's pretty convincing as is and is ulitmately a small detail. * Correct various grammar and spelling errors A final pass to clean up any grammatical or spelling errors in the comments * Re-organized Character.gd Hope I'm not overstepping here, but I re-organized Character.gd to make it a bit easier to read and work with. Added editor bookmarks and collapsible code regions. It's hard to parse in the diff so I recommend you look at it in Godot proper. * Commented out debug print statement I assume this was left uncommented by mistake. I was wondering what was printing that to my console. * Fixed Landing Animation Logic I guess I was up too late on my first attempt because it straight up didn't work. This new version works as far as my testing can tell. * Removed some unused variables
2024-10-25 16:30:03 -04:00
"land_center": SubResource("Animation_3eyjl"),
2024-02-29 19:36:50 -08:00
"land_left": SubResource("Animation_l1rph"),
"land_right": SubResource("Animation_vsknp")
2024-01-19 20:31:04 -08:00
}
2023-12-01 22:26:46 -08:00
[sub_resource type="Theme" id="Theme_wdf0f"]
MarginContainer/constants/margin_bottom = 10
MarginContainer/constants/margin_left = 10
MarginContainer/constants/margin_right = 10
MarginContainer/constants/margin_top = 10
2024-01-20 14:42:32 -08:00
[sub_resource type="SphereShape3D" id="SphereShape3D_k4wwl"]
[node name="Character" type="CharacterBody3D" node_paths=PackedStringArray("HEAD", "CAMERA", "HEADBOB_ANIMATION", "JUMP_ANIMATION", "CROUCH_ANIMATION", "COLLISION_MESH")]
Various enhancements, fixes, and tweaks focused on improving the inspector (#34) * Added Dynamic Gravity Toggle Added an editor toggle for dynamic gravity so users don't need to uncomment code in character.gd. * Refactor controls export variables Changed controls export variables to be a single dictionary so they can be edited completely in the editor without having to open the script. I also refactored the controller support section to allow similar functionality for controller specific controls and removed the need to uncomment/comment out lines of code to turn on/off controller support. * Add more editor descriptions and implement camera axis inversion options Added/tweaked export variable descriptions so everything has one. Also slightly refactored the camera input inversion code and added the ability to invert the camera x axis. * Added direction based landing animations Added some logic to determine which landing animation to play so it's not random anymore. Also added a land_center animation for the case of neutral landings. This can be expanded if desired, but it's pretty convincing as is and is ulitmately a small detail. * Correct various grammar and spelling errors A final pass to clean up any grammatical or spelling errors in the comments * Re-organized Character.gd Hope I'm not overstepping here, but I re-organized Character.gd to make it a bit easier to read and work with. Added editor bookmarks and collapsible code regions. It's hard to parse in the diff so I recommend you look at it in Godot proper. * Commented out debug print statement I assume this was left uncommented by mistake. I was wondering what was printing that to my console. * Fixed Landing Animation Logic I guess I was up too late on my first attempt because it straight up didn't work. This new version works as far as my testing can tell. * Removed some unused variables
2024-10-25 16:30:03 -04:00
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 0, 0)
2023-12-01 22:26:46 -08:00
script = ExtResource("1_0t4e8")
2024-03-01 16:02:23 -08:00
default_reticle = "res://addons/fpc/reticles/reticle_1.tscn"
2023-12-01 22:26:46 -08:00
HEAD = NodePath("Head")
CAMERA = NodePath("Head/Camera")
2024-01-19 20:31:04 -08:00
HEADBOB_ANIMATION = NodePath("Head/HeadbobAnimation")
JUMP_ANIMATION = NodePath("Head/JumpAnimation")
2024-01-20 14:42:32 -08:00
CROUCH_ANIMATION = NodePath("CrouchAnimation")
COLLISION_MESH = NodePath("Collision")
2023-12-01 22:26:46 -08:00
[node name="Mesh" type="MeshInstance3D" parent="."]
2024-01-20 19:23:14 -08:00
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
2023-12-01 22:26:46 -08:00
mesh = SubResource("CapsuleMesh_jw1de")
[node name="Collision" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
shape = SubResource("CapsuleShape3D_uy03j")
2024-01-20 14:42:32 -08:00
[node name="CrouchAnimation" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_5e5t5")
}
2023-12-01 22:26:46 -08:00
[node name="Head" type="Node3D" parent="."]
2024-07-24 11:35:05 -07:00
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0)
2023-12-01 22:26:46 -08:00
[node name="Camera" type="Camera3D" parent="Head"]
2024-01-19 20:31:04 -08:00
[node name="HeadbobAnimation" type="AnimationPlayer" parent="Head"]
2023-12-01 22:26:46 -08:00
libraries = {
"": SubResource("AnimationLibrary_o0unb")
}
2024-07-23 19:07:42 -07:00
blend_times = [&"RESET", &"RESET", 0.5, &"RESET", &"walk", 0.5, &"walk", &"RESET", 0.5]
2023-12-01 22:26:46 -08:00
2024-01-19 20:31:04 -08:00
[node name="JumpAnimation" type="AnimationPlayer" parent="Head"]
libraries = {
"": SubResource("AnimationLibrary_qeg5r")
}
speed_scale = 4.0
2023-12-01 22:26:46 -08:00
[node name="UserInterface" type="Control" parent="."]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 1
[node name="DebugPanel" type="PanelContainer" parent="UserInterface"]
visible = false
2023-12-01 22:26:46 -08:00
layout_mode = 0
offset_left = 10.0
offset_top = 10.0
offset_right = 453.0
offset_bottom = 50.0
theme = SubResource("Theme_wdf0f")
script = ExtResource("3_x1wcc")
[node name="MarginContainer" type="MarginContainer" parent="UserInterface/DebugPanel"]
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="UserInterface/DebugPanel/MarginContainer"]
layout_mode = 2
2024-01-20 14:42:32 -08:00
[node name="CrouchCeilingDetection" type="ShapeCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
2024-01-20 14:42:32 -08:00
shape = SubResource("SphereShape3D_k4wwl")
target_position = Vector3(0, 0.5, 0)
2024-05-28 20:28:37 -07:00
[node name="EditorModule" type="Node" parent="."]
script = ExtResource("3_v3ckk")