#Why isn't this working?

2 messages · Page 1 of 1 (latest)

unkempt inlet
#

I'm still learning Godot, and following an older tutorial to teach myself. I can catch on to most differences, however the 'move_and_slide' command seems to work differently now. Can someoneone tell me why this doesn't work:

vel = move_and_slide(vel, Vector2.UP)

viral plover
#

In godot 4 you need to use the variable velocity (so instead of using your created var vel, just use velocity, and do not create it because it's already declared for CharacterBody2D).
Secondly, move_and_slide doesn't use any arguments now, so just call it as move_and_slide()