generated from krampus/template-godot4
Added head bob & footstep SFX
This commit is contained in:
parent
53884a8232
commit
03aff37ee7
BIN
asset_dev/sfx/696374__sanderboah__walking-on-metal.wav
Normal file
BIN
asset_dev/sfx/696374__sanderboah__walking-on-metal.wav
Normal file
Binary file not shown.
BIN
assets/sfx/footsteps/metal/metal1.wav
Normal file
BIN
assets/sfx/footsteps/metal/metal1.wav
Normal file
Binary file not shown.
24
assets/sfx/footsteps/metal/metal1.wav.import
Normal file
24
assets/sfx/footsteps/metal/metal1.wav.import
Normal file
@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://di0e1l1l6l3qc"
|
||||
path="res://.godot/imported/metal1.wav-abec163e69d3b8c2b88c018c6d6fd53a.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sfx/footsteps/metal/metal1.wav"
|
||||
dest_files=["res://.godot/imported/metal1.wav-abec163e69d3b8c2b88c018c6d6fd53a.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
BIN
assets/sfx/footsteps/metal/metal10.wav
Normal file
BIN
assets/sfx/footsteps/metal/metal10.wav
Normal file
Binary file not shown.
24
assets/sfx/footsteps/metal/metal10.wav.import
Normal file
24
assets/sfx/footsteps/metal/metal10.wav.import
Normal file
@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://btiyoi1ipofd"
|
||||
path="res://.godot/imported/metal10.wav-f330161b601abcba2af8d992baf863cd.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sfx/footsteps/metal/metal10.wav"
|
||||
dest_files=["res://.godot/imported/metal10.wav-f330161b601abcba2af8d992baf863cd.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
BIN
assets/sfx/footsteps/metal/metal11.wav
Normal file
BIN
assets/sfx/footsteps/metal/metal11.wav
Normal file
Binary file not shown.
24
assets/sfx/footsteps/metal/metal11.wav.import
Normal file
24
assets/sfx/footsteps/metal/metal11.wav.import
Normal file
@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://eagr344y4coh"
|
||||
path="res://.godot/imported/metal11.wav-50429a719453f9b3167e120d3c968fde.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sfx/footsteps/metal/metal11.wav"
|
||||
dest_files=["res://.godot/imported/metal11.wav-50429a719453f9b3167e120d3c968fde.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
BIN
assets/sfx/footsteps/metal/metal2.wav
Normal file
BIN
assets/sfx/footsteps/metal/metal2.wav
Normal file
Binary file not shown.
24
assets/sfx/footsteps/metal/metal2.wav.import
Normal file
24
assets/sfx/footsteps/metal/metal2.wav.import
Normal file
@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://bguwbr0nlhgkl"
|
||||
path="res://.godot/imported/metal2.wav-994ad8bf412d1693eee9a314cb45b716.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sfx/footsteps/metal/metal2.wav"
|
||||
dest_files=["res://.godot/imported/metal2.wav-994ad8bf412d1693eee9a314cb45b716.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
BIN
assets/sfx/footsteps/metal/metal3.wav
Normal file
BIN
assets/sfx/footsteps/metal/metal3.wav
Normal file
Binary file not shown.
24
assets/sfx/footsteps/metal/metal3.wav.import
Normal file
24
assets/sfx/footsteps/metal/metal3.wav.import
Normal file
@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://bv00dudic2mvp"
|
||||
path="res://.godot/imported/metal3.wav-dfc0f68dda580cc92a343cd9775b7f25.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sfx/footsteps/metal/metal3.wav"
|
||||
dest_files=["res://.godot/imported/metal3.wav-dfc0f68dda580cc92a343cd9775b7f25.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
BIN
assets/sfx/footsteps/metal/metal4.wav
Normal file
BIN
assets/sfx/footsteps/metal/metal4.wav
Normal file
Binary file not shown.
24
assets/sfx/footsteps/metal/metal4.wav.import
Normal file
24
assets/sfx/footsteps/metal/metal4.wav.import
Normal file
@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://co83ygaa4d65u"
|
||||
path="res://.godot/imported/metal4.wav-821733427b3229063559b57480349a37.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sfx/footsteps/metal/metal4.wav"
|
||||
dest_files=["res://.godot/imported/metal4.wav-821733427b3229063559b57480349a37.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
BIN
assets/sfx/footsteps/metal/metal5.wav
Normal file
BIN
assets/sfx/footsteps/metal/metal5.wav
Normal file
Binary file not shown.
24
assets/sfx/footsteps/metal/metal5.wav.import
Normal file
24
assets/sfx/footsteps/metal/metal5.wav.import
Normal file
@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://befqnsqlbpca7"
|
||||
path="res://.godot/imported/metal5.wav-effadb87795f8e91effd78440f2ce271.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sfx/footsteps/metal/metal5.wav"
|
||||
dest_files=["res://.godot/imported/metal5.wav-effadb87795f8e91effd78440f2ce271.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
BIN
assets/sfx/footsteps/metal/metal6.wav
Normal file
BIN
assets/sfx/footsteps/metal/metal6.wav
Normal file
Binary file not shown.
24
assets/sfx/footsteps/metal/metal6.wav.import
Normal file
24
assets/sfx/footsteps/metal/metal6.wav.import
Normal file
@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://dkx88wqwfvfst"
|
||||
path="res://.godot/imported/metal6.wav-e276d8badb061ea92d2662d46f8e2976.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sfx/footsteps/metal/metal6.wav"
|
||||
dest_files=["res://.godot/imported/metal6.wav-e276d8badb061ea92d2662d46f8e2976.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
BIN
assets/sfx/footsteps/metal/metal7.wav
Normal file
BIN
assets/sfx/footsteps/metal/metal7.wav
Normal file
Binary file not shown.
24
assets/sfx/footsteps/metal/metal7.wav.import
Normal file
24
assets/sfx/footsteps/metal/metal7.wav.import
Normal file
@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://c6wnc7kqtvujm"
|
||||
path="res://.godot/imported/metal7.wav-aaf6b6fab7966db31f58a82a4ea7bf49.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sfx/footsteps/metal/metal7.wav"
|
||||
dest_files=["res://.godot/imported/metal7.wav-aaf6b6fab7966db31f58a82a4ea7bf49.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
BIN
assets/sfx/footsteps/metal/metal8.wav
Normal file
BIN
assets/sfx/footsteps/metal/metal8.wav
Normal file
Binary file not shown.
24
assets/sfx/footsteps/metal/metal8.wav.import
Normal file
24
assets/sfx/footsteps/metal/metal8.wav.import
Normal file
@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://bo3klycfvvq2q"
|
||||
path="res://.godot/imported/metal8.wav-89eebabbdb41236dfc3c37d668cb34d6.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sfx/footsteps/metal/metal8.wav"
|
||||
dest_files=["res://.godot/imported/metal8.wav-89eebabbdb41236dfc3c37d668cb34d6.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
BIN
assets/sfx/footsteps/metal/metal9.wav
Normal file
BIN
assets/sfx/footsteps/metal/metal9.wav
Normal file
Binary file not shown.
24
assets/sfx/footsteps/metal/metal9.wav.import
Normal file
24
assets/sfx/footsteps/metal/metal9.wav.import
Normal file
@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://bpdnw4qgbp6kj"
|
||||
path="res://.godot/imported/metal9.wav-1c009f88e12c346351f2a83e27df0786.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sfx/footsteps/metal/metal9.wav"
|
||||
dest_files=["res://.godot/imported/metal9.wav-1c009f88e12c346351f2a83e27df0786.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
15
default_bus_layout.tres
Normal file
15
default_bus_layout.tres
Normal file
@ -0,0 +1,15 @@
|
||||
[gd_resource type="AudioBusLayout" format=3 uid="uid://caten2l7w1h6w"]
|
||||
|
||||
[resource]
|
||||
bus/1/name = &"Music"
|
||||
bus/1/solo = false
|
||||
bus/1/mute = false
|
||||
bus/1/bypass_fx = false
|
||||
bus/1/volume_db = 0.0
|
||||
bus/1/send = &"Master"
|
||||
bus/2/name = &"SFX"
|
||||
bus/2/solo = false
|
||||
bus/2/mute = false
|
||||
bus/2/bypass_fx = false
|
||||
bus/2/volume_db = 0.0
|
||||
bus/2/send = &"Master"
|
@ -18,9 +18,9 @@ func _unhandled_input(event: InputEvent) -> void:
|
||||
|
||||
|
||||
func camera_motion(motion: Vector2) -> void:
|
||||
var x_sensitivity: float = ProjectSettings.get_setting("game/config/input/mouse_sensitivity_x")
|
||||
var y_sensitivity: float = ProjectSettings.get_setting("game/config/input/mouse_sensitivity_y")
|
||||
var invert_pitch: bool = ProjectSettings.get_setting("game/config/input/invert_pitch")
|
||||
var x_sensitivity: float = Game.settings.mouse_sensitivity_x
|
||||
var y_sensitivity: float = Game.settings.mouse_sensitivity_y
|
||||
var invert_pitch: bool = Game.settings.invert_pitch
|
||||
if player.firing:
|
||||
# Focus movement when firing
|
||||
# Game mechanic, should not be user-configurable.
|
||||
@ -36,9 +36,7 @@ func camera_motion(motion: Vector2) -> void:
|
||||
|
||||
|
||||
func _physics_process(_delta: float) -> void:
|
||||
var mouse_accel: float = (
|
||||
ProjectSettings.get_setting("game/config/input/mouse_acceleration") / 60.0
|
||||
)
|
||||
var mouse_accel: float = Game.settings.mouse_acceleration / 60.0
|
||||
if player.firing:
|
||||
mouse_accel = FOCUS_ACCELERATION / 60.0
|
||||
rotation.y = lerp_angle(rotation.y, _target.y, mouse_accel)
|
||||
|
23
src/player/footsteps/foot_controller.gd
Normal file
23
src/player/footsteps/foot_controller.gd
Normal file
@ -0,0 +1,23 @@
|
||||
class_name FootController extends Node3D
|
||||
|
||||
enum SurfaceMaterial {
|
||||
UNKNOWN,
|
||||
GRUNK,
|
||||
PLASTIC,
|
||||
METAL,
|
||||
}
|
||||
|
||||
@onready var metal: AudioStreamPlayer3D = $Metal
|
||||
|
||||
|
||||
func get_player_for_material(surface_material: SurfaceMaterial) -> AudioStreamPlayer3D:
|
||||
match surface_material:
|
||||
SurfaceMaterial.GRUNK:
|
||||
pass # TODO
|
||||
SurfaceMaterial.PLASTIC:
|
||||
pass # TODO
|
||||
SurfaceMaterial.METAL:
|
||||
return metal
|
||||
SurfaceMaterial.UNKNOWN:
|
||||
pass
|
||||
return null
|
1
src/player/footsteps/foot_controller.gd.uid
Normal file
1
src/player/footsteps/foot_controller.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://brqa2wbtaspw4
|
27
src/player/footsteps/footstep_controller.gd
Normal file
27
src/player/footsteps/footstep_controller.gd
Normal file
@ -0,0 +1,27 @@
|
||||
class_name FootstepController extends Node3D
|
||||
|
||||
const BASE_VOLUME := -42.0
|
||||
const MUTE_VELOCITY := 1.0
|
||||
const VELOCITY_FACTOR := 2.0
|
||||
|
||||
var _on_right_foot := false
|
||||
|
||||
@onready var player: Player = owner
|
||||
|
||||
@onready var left_foot: FootController = %LeftFoot
|
||||
@onready var right_foot: FootController = %RightFoot
|
||||
|
||||
|
||||
func play_footstep() -> void:
|
||||
var foot := right_foot if _on_right_foot else left_foot
|
||||
|
||||
var relative_speed := player.velocity.length() - MUTE_VELOCITY
|
||||
if relative_speed < 0:
|
||||
return
|
||||
|
||||
# TODO: detect surface material
|
||||
var sfx := foot.get_player_for_material(FootController.SurfaceMaterial.METAL)
|
||||
sfx.volume_db = BASE_VOLUME + relative_speed * VELOCITY_FACTOR
|
||||
sfx.play()
|
||||
|
||||
_on_right_foot = not _on_right_foot
|
1
src/player/footsteps/footstep_controller.gd.uid
Normal file
1
src/player/footsteps/footstep_controller.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://ecrhsueph7at
|
37
src/player/headbob_controller.gd
Normal file
37
src/player/headbob_controller.gd
Normal file
@ -0,0 +1,37 @@
|
||||
extends AnimationTree
|
||||
|
||||
const BLEND_ACCELERATION := 10.0
|
||||
const VELOCITY_BLEND_FACTOR := 0.0643
|
||||
const VELOCITY_TIMESCALE_FACTOR := 0.25
|
||||
|
||||
var blend: float:
|
||||
set(value):
|
||||
self["parameters/blend/blend_amount"] = value
|
||||
get:
|
||||
return self["parameters/blend/blend_amount"]
|
||||
|
||||
var timescale: float:
|
||||
set(value):
|
||||
self["parameters/timescale/scale"] = value
|
||||
get:
|
||||
return self["parameters/timescale/scale"]
|
||||
|
||||
@onready var player: Player = owner
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
var speed := player.velocity.length()
|
||||
if player.is_on_floor():
|
||||
var timescale_target := speed * VELOCITY_TIMESCALE_FACTOR
|
||||
timescale = lerpf(timescale, timescale_target, BLEND_ACCELERATION * delta)
|
||||
else:
|
||||
timescale = 0.0
|
||||
|
||||
if Game.settings.enable_head_bob:
|
||||
var blend_target := 0.0
|
||||
if player.is_on_floor():
|
||||
blend_target = speed * VELOCITY_BLEND_FACTOR
|
||||
|
||||
blend = lerpf(blend, blend_target, BLEND_ACCELERATION * delta)
|
||||
else:
|
||||
blend = 0.0
|
1
src/player/headbob_controller.gd.uid
Normal file
1
src/player/headbob_controller.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://b1vyq7e81nyt0
|
@ -4,7 +4,9 @@ const FOCUS_SPEED := 30.0
|
||||
const RUN_SPEED := 80.0
|
||||
const SPRINT_SPEED := 160.0
|
||||
const AIR_SPEED := 10.0
|
||||
|
||||
const JUMP_FORCE := 4.5
|
||||
|
||||
const GROUND_FRICTION := 0.3
|
||||
const AIR_FRICTION := 0.03
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://bwe2jdmvinhqd"]
|
||||
[gd_scene load_steps=36 format=3 uid="uid://bwe2jdmvinhqd"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://buwh0g1ga2aka" path="res://src/player/player.gd" id="1_npueo"]
|
||||
[ext_resource type="Script" uid="uid://cx1yt0drthpw3" path="res://src/player/camera_controller.gd" id="2_veeqv"]
|
||||
@ -7,11 +7,180 @@
|
||||
[ext_resource type="Script" uid="uid://cwy3akimaeib" path="res://src/player/tool_mount.gd" id="3_jiejy"]
|
||||
[ext_resource type="PackedScene" uid="uid://dq1x21tq06dud" path="res://src/ui/hud/player_hud.tscn" id="5_jvafu"]
|
||||
[ext_resource type="PackedScene" uid="uid://qknkdy6aics1" path="res://src/equipment/toothbrush/toothbrush.tscn" id="6_o822w"]
|
||||
[ext_resource type="Script" uid="uid://b1vyq7e81nyt0" path="res://src/player/headbob_controller.gd" id="7_x42xx"]
|
||||
[ext_resource type="Script" uid="uid://ecrhsueph7at" path="res://src/player/footsteps/footstep_controller.gd" id="9_hja65"]
|
||||
[ext_resource type="Script" uid="uid://brqa2wbtaspw4" path="res://src/player/footsteps/foot_controller.gd" id="9_l271a"]
|
||||
[ext_resource type="AudioStream" uid="uid://di0e1l1l6l3qc" path="res://assets/sfx/footsteps/metal/metal1.wav" id="10_jcdrv"]
|
||||
[ext_resource type="AudioStream" uid="uid://bv00dudic2mvp" path="res://assets/sfx/footsteps/metal/metal3.wav" id="11_hja65"]
|
||||
[ext_resource type="AudioStream" uid="uid://befqnsqlbpca7" path="res://assets/sfx/footsteps/metal/metal5.wav" id="12_5shm8"]
|
||||
[ext_resource type="AudioStream" uid="uid://c6wnc7kqtvujm" path="res://assets/sfx/footsteps/metal/metal7.wav" id="13_5efpn"]
|
||||
[ext_resource type="AudioStream" uid="uid://bpdnw4qgbp6kj" path="res://assets/sfx/footsteps/metal/metal9.wav" id="14_4uy46"]
|
||||
[ext_resource type="AudioStream" uid="uid://eagr344y4coh" path="res://assets/sfx/footsteps/metal/metal11.wav" id="15_k60ra"]
|
||||
[ext_resource type="AudioStream" uid="uid://bguwbr0nlhgkl" path="res://assets/sfx/footsteps/metal/metal2.wav" id="16_a4vah"]
|
||||
[ext_resource type="AudioStream" uid="uid://co83ygaa4d65u" path="res://assets/sfx/footsteps/metal/metal4.wav" id="17_vwi60"]
|
||||
[ext_resource type="AudioStream" uid="uid://dkx88wqwfvfst" path="res://assets/sfx/footsteps/metal/metal6.wav" id="18_o04tx"]
|
||||
[ext_resource type="AudioStream" uid="uid://bo3klycfvvq2q" path="res://assets/sfx/footsteps/metal/metal8.wav" id="19_j2873"]
|
||||
[ext_resource type="AudioStream" uid="uid://btiyoi1ipofd" path="res://assets/sfx/footsteps/metal/metal10.wav" id="20_dpt0q"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_x42xx"]
|
||||
length = 0.001
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:position:x")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"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(".: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)
|
||||
}
|
||||
tracks/2/type = "bezier"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath(".:position:z")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"handle_modes": PackedInt32Array(0),
|
||||
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_o822w"]
|
||||
resource_name = "head_bob"
|
||||
loop_mode = 1
|
||||
step = 0.005
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:position:x")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0, 0, 0),
|
||||
"points": PackedFloat32Array(0, -0.25, 0, 0.125, 0.05, 0.05, -0.125, 0, 0.25, 0, -0.05, -0.25, 0, 0.125, 0, 0, -0.125, -0.05, 0.25, 0),
|
||||
"times": PackedFloat32Array(0, 0.25, 0.75, 1)
|
||||
}
|
||||
tracks/1/type = "bezier"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath(".:position:y")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0, 0, 0, 0, 0),
|
||||
"points": PackedFloat32Array(0, -0.25, 0, 0.031, 0.04, 0.081, -0.062, 0, 0.125, 0, -0.081, -0.125, 0, 0.125, 0, 0.081, -0.125, 0, 0.125, 0, -0.081, -0.125, 0, 0.063, 0, 0.00176717, -0.031, -0.04, 0.125, 0),
|
||||
"times": PackedFloat32Array(0, 0.13, 0.375, 0.625, 0.875, 1)
|
||||
}
|
||||
tracks/2/type = "bezier"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath(".:position:z")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"handle_modes": PackedInt32Array(0),
|
||||
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_hja65"]
|
||||
resource_name = "footstep_sfx"
|
||||
loop_mode = 1
|
||||
step = 0.01
|
||||
tracks/0/type = "method"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("%FootstepController")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0.35, 0.85),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"values": [{
|
||||
"args": [],
|
||||
"method": &"play_footstep"
|
||||
}, {
|
||||
"args": [],
|
||||
"method": &"play_footstep"
|
||||
}]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_l271a"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_x42xx"),
|
||||
&"footstep_sfx": SubResource("Animation_hja65"),
|
||||
&"head_bob": SubResource("Animation_o822w")
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_o822w"]
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_x42xx"]
|
||||
animation = &"head_bob"
|
||||
|
||||
[sub_resource type="AnimationNodeAdd2" id="AnimationNodeAdd2_hja65"]
|
||||
sync = true
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_5shm8"]
|
||||
animation = &"footstep_sfx"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_l271a"]
|
||||
animation = &"RESET"
|
||||
|
||||
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_8ydov"]
|
||||
|
||||
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_ylhto"]
|
||||
graph_offset = Vector2(-331.385, 78.9745)
|
||||
nodes/blend/node = SubResource("AnimationNodeBlend2_o822w")
|
||||
nodes/blend/position = Vector2(779, 166)
|
||||
nodes/bob_anim/node = SubResource("AnimationNodeAnimation_x42xx")
|
||||
nodes/bob_anim/position = Vector2(540, 260)
|
||||
nodes/output/position = Vector2(1460, 140)
|
||||
nodes/sfx_add/node = SubResource("AnimationNodeAdd2_hja65")
|
||||
nodes/sfx_add/position = Vector2(1020, 160)
|
||||
nodes/sfx_anim/node = SubResource("AnimationNodeAnimation_5shm8")
|
||||
nodes/sfx_anim/position = Vector2(540, 520)
|
||||
nodes/still_anim/node = SubResource("AnimationNodeAnimation_l271a")
|
||||
nodes/still_anim/position = Vector2(540, 40)
|
||||
nodes/timescale/node = SubResource("AnimationNodeTimeScale_8ydov")
|
||||
nodes/timescale/position = Vector2(1240, 120)
|
||||
node_connections = [&"blend", 0, &"still_anim", &"blend", 1, &"bob_anim", &"output", 0, &"timescale", &"sfx_add", 0, &"blend", &"sfx_add", 1, &"sfx_anim", &"timescale", 0, &"sfx_add"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_s7f0r"]
|
||||
radius = 0.4
|
||||
height = 1.9
|
||||
|
||||
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_8ydov"]
|
||||
random_pitch = 1.1
|
||||
streams_count = 6
|
||||
stream_0/stream = ExtResource("10_jcdrv")
|
||||
stream_1/stream = ExtResource("11_hja65")
|
||||
stream_2/stream = ExtResource("12_5shm8")
|
||||
stream_3/stream = ExtResource("13_5efpn")
|
||||
stream_4/stream = ExtResource("14_4uy46")
|
||||
stream_5/stream = ExtResource("15_k60ra")
|
||||
|
||||
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_ylhto"]
|
||||
random_pitch = 1.1
|
||||
streams_count = 5
|
||||
stream_0/stream = ExtResource("16_a4vah")
|
||||
stream_1/stream = ExtResource("17_vwi60")
|
||||
stream_2/stream = ExtResource("18_o04tx")
|
||||
stream_3/stream = ExtResource("19_j2873")
|
||||
stream_4/stream = ExtResource("20_dpt0q")
|
||||
|
||||
[node name="Player" type="CharacterBody3D"]
|
||||
script = ExtResource("1_npueo")
|
||||
|
||||
@ -37,15 +206,17 @@ visible = false
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="CameraPivot"]
|
||||
[node name="CameraPosition" type="Node3D" parent="CameraPivot"]
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="CameraPivot/CameraPosition"]
|
||||
current = true
|
||||
|
||||
[node name="InteractRay" type="RayCast3D" parent="CameraPivot/Camera3D"]
|
||||
[node name="InteractRay" type="RayCast3D" parent="CameraPivot/CameraPosition/Camera3D"]
|
||||
unique_name_in_owner = true
|
||||
target_position = Vector3(0, 0, -1.5)
|
||||
collision_mask = 2
|
||||
|
||||
[node name="FarLight" type="OmniLight3D" parent="CameraPivot/Camera3D"]
|
||||
[node name="FarLight" type="OmniLight3D" parent="CameraPivot/CameraPosition/Camera3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.1)
|
||||
light_energy = 0.05
|
||||
light_specular = 0.01
|
||||
@ -53,15 +224,55 @@ light_cull_mask = 4294967293
|
||||
omni_range = 50.0
|
||||
omni_attenuation = 0.0
|
||||
|
||||
[node name="NearLight" type="OmniLight3D" parent="CameraPivot/Camera3D"]
|
||||
[node name="NearLight" type="OmniLight3D" parent="CameraPivot/CameraPosition/Camera3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.1)
|
||||
light_specular = 0.01
|
||||
light_cull_mask = 4294967293
|
||||
omni_range = 2.0
|
||||
|
||||
[node name="HeadbobAnimation" type="AnimationPlayer" parent="CameraPivot/CameraPosition/Camera3D"]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_l271a")
|
||||
}
|
||||
|
||||
[node name="HeadbobController" type="AnimationTree" parent="CameraPivot/CameraPosition/Camera3D/HeadbobAnimation"]
|
||||
unique_name_in_owner = true
|
||||
root_node = NodePath("%HeadbobController/../..")
|
||||
tree_root = SubResource("AnimationNodeBlendTree_ylhto")
|
||||
anim_player = NodePath("..")
|
||||
parameters/blend/blend_amount = 0.0
|
||||
parameters/sfx_add/add_amount = 1.0
|
||||
parameters/timescale/scale = 1.0
|
||||
script = ExtResource("7_x42xx")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.05, 0)
|
||||
shape = SubResource("CapsuleShape3D_s7f0r")
|
||||
|
||||
[node name="PlayerHUD" parent="." instance=ExtResource("5_jvafu")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="FootstepController" type="Node3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
|
||||
script = ExtResource("9_hja65")
|
||||
|
||||
[node name="LeftFoot" type="Node3D" parent="FootstepController"]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.4, 0, 0)
|
||||
script = ExtResource("9_l271a")
|
||||
|
||||
[node name="Metal" type="AudioStreamPlayer3D" parent="FootstepController/LeftFoot"]
|
||||
stream = SubResource("AudioStreamRandomizer_8ydov")
|
||||
volume_db = -42.0
|
||||
bus = &"SFX"
|
||||
|
||||
[node name="RightFoot" type="Node3D" parent="FootstepController"]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.4, 0, 0)
|
||||
script = ExtResource("9_l271a")
|
||||
|
||||
[node name="Metal" type="AudioStreamPlayer3D" parent="FootstepController/RightFoot"]
|
||||
stream = SubResource("AudioStreamRandomizer_ylhto")
|
||||
volume_db = -42.0
|
||||
bus = &"SFX"
|
||||
|
5
vault/assets/asset credits.md
Normal file
5
vault/assets/asset credits.md
Normal file
@ -0,0 +1,5 @@
|
||||
- SFX
|
||||
- "Walking on Metal"
|
||||
- author: Sanderboah
|
||||
- retrieved from https://freesound.org/people/Sanderboah/sounds/696374/
|
||||
- assets/sfx/footsteps/metal/metal*.wav
|
Loading…
x
Reference in New Issue
Block a user