• Godot Help
  • How to detect when the Player has first landed

Hi,
Just as the title says, I'd like to know the best way to determine when the Player has first hit the ground. This way I can generate some game juice with foot dust.
I understand that I may be able to use a boolean test, but perhaps there is a more straight-forward way.

Here's my grounded code:

#SET IF ON THE GROUND OR NOT
    if is_on_floor() :
        onGround = true
    else:
        onGround = false
        if myVelocity.y < 0:
            $AnimatedSprite.play("Jump")
        if myVelocity.y > 0 :
            $AnimatedSprite.play("Fall")

    myVelocity = move_and_slide(myVelocity, FLOOR) #MOVE PLAYER WALKING

What are your suggestions?
Thanks.

    JayBanana
    I got the answer from the Q&A forum, very simple...

    if is_on_floor() :
        if not onGround:
           make_dust()
        onGround = true