Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | GerryC1230 |
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 _update_wall_direction
var move_direction = -int(Input.is_action_pressed(“left”)) + int(Input.is_action_pressed(“right”))
var wall_direction = 1
func _update_wall_direction():
var is_near_wall_left = _check_is_valid_wall(left_wall_raycasts)
var is_near_wall_right = _check_is_valid_wall(right_wall_raycasts)
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