0

I am creating a flappy bird like game, to learn more about game development, i realized that jumping to complex project ideas isnt a good idea. So i abandoned them, and started to create. Not much has passed and i already didnt know what to do, and that is to make my kinematic body flap like in flappy bird.

i wrote this code:

using Godot;
using System;
public class Bird : KinematicBody2D
{
    public override void _Ready()
    {
    }
    public override void _Process(float delta)
    {
        if (Input.IsActionPressed("ui_up"))
        {
            this.Position += new Vector2(0, -20);
        }
        else 
        {
            this.Position += new Vector2(0, 20);
        }
    }
}

but this doesnt make the body flap, it just raises it up if an action is pressed and down if nothing else is happening

George
  • 101
  • 8
  • 2
    Have you tried [this](https://godotengine.org/asset-library/asset/926) or [this](https://www.youtube.com/watch?v=Kt1njjNGbSg)? – cak3_lover Feb 12 '23 at 21:15
  • I havent, thanks! I dont want to follow a tutorial so ill download the first one. – George Feb 16 '23 at 07:26

0 Answers0