The problem is the godot thinks that the player is near a wall when the player isn't near the wall. I'm trying to get this to work for wall jumping like super meat boy. Here's the code
(This is a comment) Possibly could have to do with the function updatewall_direction
var movedirection = -int(Input.isactionpressed("left")) + int(Input.isactionpressed("right"))
var walldirection = 1
func updatewalldirection():
var isnearwallleft = checkisvalidwall(leftwallraycasts)
var isnearwallright = _checkisvalidwall(rightwallraycasts)
if is_near_wall_left && is_near_wall_right:
wall_direction = move_direction
else:
wall_direction = -int(is_near_wall_left) + int(is_near_wall_right)
If anyone knows the problem let me know