Open dragonforge-dev opened 3 months ago
Code I removed from player_character.gd _physics_process() after tying to make this work. It worked, but played the sound incessantly.
# Collision Detection for footstep sounds
if is_player and velocity > Vector3.ZERO:
for index in range(get_slide_collision_count()):
var collision = get_slide_collision(index)
if collision.get_collider() == null:
continue
if collision.get_collider().name.contains("tile"):
$AnimationPlayer2.play("new_animation")
This may require a Godot bug fix or more research. Currently I cannot get this to work.