simplified ledge grab
This commit is contained in:
@@ -34,8 +34,6 @@ func standard_jump():
|
||||
if character.jumps_remaining > 0:
|
||||
character.jumps_remaining -= 1
|
||||
jump_with_weight_mod()
|
||||
elif is_grabbing_ledge():
|
||||
jump_with_weight_mod()
|
||||
|
||||
func apply_gravity(delta):
|
||||
character.velocity.y -= 9.8 * 1.25 * delta
|
||||
|
||||
@@ -600,7 +600,7 @@ func focus_on_target():
|
||||
camera.attributes.dof_blur_near_enabled = false
|
||||
|
||||
func weapon_tilt(input, delta):
|
||||
if input:
|
||||
if input != null:
|
||||
if !ads:
|
||||
if weapon_holder:
|
||||
weapon_holder.rotation.z = lerp(weapon_holder.rotation.z, -input.x * weapon_rotation_amount * 10, 4 * delta)
|
||||
|
||||
@@ -23,18 +23,13 @@ func Physics_Update(delta):
|
||||
if Input.is_action_just_pressed("crouch"):
|
||||
Transitioned.emit(self,"ground pound")
|
||||
|
||||
if Input.is_action_just_pressed("interact"):
|
||||
character.ledge_collision.disabled = false
|
||||
Transitioned.emit(self,"ledge grab")
|
||||
|
||||
enable_wall_rays()
|
||||
|
||||
if can_wall_run():
|
||||
start_wall_running()
|
||||
|
||||
ledge_grab()
|
||||
standard_jump()
|
||||
|
||||
|
||||
|
||||
func Exit():
|
||||
character.ledge_collision.disabled = true
|
||||
|
||||
@@ -15,3 +15,4 @@ func Physics_Update(delta):
|
||||
Transitioned.emit(self,"crouched")
|
||||
|
||||
standard_jump()
|
||||
ledge_grab()
|
||||
|
||||
Reference in New Issue
Block a user