added wall running

This commit is contained in:
derek
2025-06-16 14:46:03 -05:00
parent 50d8935b4b
commit d1bc5d28d5
7 changed files with 67 additions and 16 deletions

View File

@@ -58,6 +58,10 @@ var last_ground_pos
## Movement
var input_dir
# Wall Running
var wall_run_surface_normal
var wall_run_direction
## GUNS AND AMMO
var gun : Node
var holstered_gun_id : int
@@ -433,17 +437,6 @@ func ladder_collide():
else:
gravity = level_control.gamemode.gravity
func wall_jump():
if can_wall_jump == true:
if wall_ray_1.is_colliding() or wall_ray_2.is_colliding() or wall_ray_3.is_colliding():
can_wall_jump = false
wall_jump_timer.start()
return true
else:
return false
else:
return false
func _on_wall_jump_timer_timeout() -> void:
can_wall_jump = true
@@ -474,9 +467,6 @@ func grab_moveable(body):
body.gravity_scale = 0
moveable_holder.add_child(body)
body.global_position = moveable_holder.global_position
#for i in body.get_children():
#if i.get_class() == "CollisionShape3D":
#i.collision_layer = true
held_item = body
func hold_item(_delta):