Jump to content

How to check for certain touching.down


gesichtsfelsen
 Share

Recommended Posts

Hi,

i'm currently woriking on a litle Phaser side scroller.
My problem is, my player can jump on items such as stars, and other things. I tried it with arcade.overlap like this: 

    if (cursors.up.isDown && player1.body.touching.down && !game.physics.arcade.overlap(player1, stars))
    {
        player1.body.velocity.y = -700;
}

But it didn't work for some reason...

I didn't get any errors, but I can still jump on the stars.

 

Does somebody have a solution for this?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...