Character just sticks there

Godot Version

`4.3

Hello everyone, I’m new to Godot and I tried following 2 YouTube tutorials and always end up in the same position, I’m trying to make a flappy bird like game but my character just floats doesn’t fall due to gravity noting just sticks there, please help


Hear is the code, btw the video is just playing to see if the character falls I just need it to fall atleast, thank you for reading

The class CharacterBody2D and its function move_and_slide() uses the internal variable velocity. Just delete the motion declaration and replace motion.y with velocity.y.

3 Likes

Also, you don’t need the UP constant declaration. godot already provides the up Vector for you as Vector2.UP

1 Like