feat: refine character animation and gameplay UI

This commit is contained in:
Alexander Sellite 2026-08-09 22:27:33 -04:00
parent 63a5009b33
commit 54e1b8538d
14 changed files with 314 additions and 55 deletions

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=18 format=3]
[gd_scene load_steps=21 format=3]
[ext_resource type="Script" path="res://player/player.gd" id="1_script"]
[ext_resource type="Script" path="res://inventory/fish_inventory.gd" id="2_inventory"]
@ -24,6 +24,17 @@ height = 1.8
material = ExtResource("12_blob_shadow")
size = Vector2(1.15, 0.72)
[sub_resource type="Shader" id="SprintDustShader"]
code = "shader_type spatial;\nrender_mode blend_mix, depth_draw_never, cull_disabled, unshaded, shadows_disabled;\n\nuniform vec4 dust_color : source_color = vec4(0.47, 0.39, 0.27, 0.42);\nvarying float particle_phase;\n\nvoid vertex() {\n\tparticle_phase = INSTANCE_CUSTOM.y;\n\tMODELVIEW_MATRIX = VIEW_MATRIX * mat4(\n\t\tINV_VIEW_MATRIX[0],\n\t\tINV_VIEW_MATRIX[1],\n\t\tINV_VIEW_MATRIX[2],\n\t\tMODEL_MATRIX[3]\n\t);\n}\n\nvoid fragment() {\n\tvec2 centered_uv = UV * 2.0 - 1.0;\n\tfloat angle = atan(centered_uv.y, centered_uv.x);\n\tfloat edge_wobble = sin(angle * 5.0 + particle_phase * 8.0) * 0.07;\n\tfloat radius = length(centered_uv);\n\tfloat soft_shape = 1.0 - smoothstep(0.48 + edge_wobble, 1.0 + edge_wobble, radius);\n\tfloat fade_in = smoothstep(0.0, 0.12, particle_phase);\n\tfloat fade_out = 1.0 - smoothstep(0.38, 1.0, particle_phase);\n\tALBEDO = dust_color.rgb;\n\tALPHA = soft_shape * dust_color.a * fade_in * fade_out;\n}\n"
[sub_resource type="ShaderMaterial" id="SprintDustMaterial"]
render_priority = 1
shader = SubResource("SprintDustShader")
[sub_resource type="QuadMesh" id="SprintDustMesh"]
material = SubResource("SprintDustMaterial")
size = Vector2(0.38, 0.28)
[node name="Player" type="CharacterBody3D"]
collision_layer = 2
collision_mask = 1
@ -55,6 +66,28 @@ rotation_degrees = Vector3(-90, 0, 0)
cast_shadow = 0
mesh = SubResource("GroundShadowMesh")
[node name="SprintDust" type="CPUParticles3D" parent="."]
unique_name_in_owner = true
position = Vector3(0, 0.08, 0)
emitting = false
amount = 16
lifetime = 0.65
randomness = 0.55
visibility_aabb = AABB(-4, -2, -4, 8, 5, 8)
local_coords = false
emission_shape = 3
emission_box_extents = Vector3(0.24, 0.03, 0.16)
direction = Vector3(0, 1, 0)
spread = 65.0
gravity = Vector3(0, -0.8, 0)
initial_velocity_min = 0.35
initial_velocity_max = 0.8
angular_velocity_min = -90.0
angular_velocity_max = 90.0
scale_amount_min = 0.35
scale_amount_max = 0.72
mesh = SubResource("SprintDustMesh")
[node name="CharacterRig" parent="Visuals" instance=ExtResource("13_character")]
rotation_degrees = Vector3(0, 180, 0)