body.onFloor(), body.blocked.down and body.touching.down allways to false

Recommended Posts

I'm making my first steps with phaser working on a simple platformer for learning, and I found a problem I can't figure how to solve. The problem is that I want the player to be able to jump only when it's on ground but I tried using  body.onFloor(), body.blocked.down and body.touching.down and I'm allways getting false return. I must be doing something wrong, but I don't know what it is. When I disable the collisions with tiles it works OK with player.body.collideWorldBounds = true; Could somebody help me, please?


Here is my tilemap creating code:

  'pencilMan', 'pencilMan');
            this.layer ='Capa de Patrones 1');


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.