hello, here is problem, when i go right i can’t go left, more details: when player achieves border of one block - he can’t go left in that direction, why is that? also he can’t go left at all, because of borders of blocks
Can you paste your character’s code? Maybe try turning on visible collision shapes
of course, here
extends CharacterBody2D
var current_state
enum State {idle, run}
func _ready():
current_state = State.idle
func _physics_process(delta):
falling(delta)
player_idle(delta)
player_run(delta)
move_and_slide()
func falling(delta):
if !is_on_floor():
velocity.y = 1000*delta
func player_idle(delta):
if is_on_floor():
current_state = State.idle
func player_run(delta):
var direction = Input.get_axis("left", "right")
if direction:
velocity.x = direction*300
else:
velocity.x = move_toward(velocity.x, 0, 300)
how can i turn on visible colision?
It’s a check box in the debug menu at the top, next to “project” and “editor”
here
and…here
Strange errors, but try changing your character’s collision shape to a capsule instead of a box, might help.
i just changed my godot version to more early and it works correctly now