How to add fall animation

I mean i want to play animimation when player start to falling but idk how or how to separate jump and fall for jump i use that

if (cursors.up.isDown && player.body.touching.down)
    {
    player.setVelocityY(-330);
    player.anims.play('jump');
    }

pls help i can’t find any tutorial and last thing i found was a topic from 3 years and guy say “f you need jumping to have a separate animation.”

should be ?

if (cursors.up.isDown && player.body.not.touching.down)
    {
    player.setVelocityY(-330);
    player.anims.play('jump');
    }

how to make inverse to touching,down???

if (player.body.velocity.y > 0) {/*…*/}
1 Like