This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

Hello, idk what is causing this problem, but in this platform, when the player going up activate my "falling" state, but when goes down the player stay 1 pixel abode the collision shape of the platform.

Here's my code:

func state_fall(delta):
    vel.y = vel.y + grav * delta
    var dir = Input.get_action_strength("direita") - Input.get_action_strength("esquerda")
    if abs(dir) > 0:
        dir_sprite = sign(dir)
        vel.x = speed * sign(dir)
        vel.x = 0
    $ + str(dir_sprite))
    vel = move_and_slide(vel, Vector2.UP)

    if Input.is_action_just_pressed("mouse"):

    if Input.is_action_just_pressed("jump") and jumps < 1:
        jumps += 1

    if is_on_floor():
        jumps = 0
        if abs(vel.x) > 0:

And here the image:
enter image description here

in Engine by (177 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.