fix: initially wrong wall touch direction when wallsliding
This commit is contained in:
parent
5c988c51aa
commit
09da6e9f3e
@ -211,11 +211,12 @@ func is_touching_wall_completely() -> bool:
|
|||||||
|
|
||||||
# Attached to wall state is in the PlayerStateMachine
|
# Attached to wall state is in the PlayerStateMachine
|
||||||
func is_correct_walljump_input(direction: Vector2) -> bool:
|
func is_correct_walljump_input(direction: Vector2) -> bool:
|
||||||
return (
|
if is_touching_wall_completely():
|
||||||
Input.is_action_pressed("jump")
|
return( Input.is_action_pressed("jump")
|
||||||
&& abs(direction.x + wall_touch_direction) < 1
|
&& abs(direction.x + wall_touch_direction) < 1
|
||||||
&& abs(direction.x + wall_touch_direction) >= 0
|
&& abs(direction.x + wall_touch_direction) >= 0
|
||||||
)
|
)
|
||||||
|
return false
|
||||||
|
|
||||||
|
|
||||||
func is_correct_airstrafe_input() -> bool:
|
func is_correct_airstrafe_input() -> bool:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user