hey, i've put a code in where the player can stop on walls, but when im jumping, im not moving at all until im on the ground, i want it to stop even if im jumping but still move at the same time
func _process(delta: float) -> void:
if is_on_floor():
groundAngle = get_floor_normal().angle() + PI/2
else:
groundAngle = 0
collisionMask.rotation = groundAngle
sprite.rotation = lerp_angle(sprite.rotation, groundAngle, 40 * delta)
velocity.x = gspd
match currentState:
"Free":
if is_on_wall() and wallSensorDetecting():
gspd = 0
stateFree(delta)
move_and_slide()