Sign in to follow this  
natanael zalazar

Help ! collision with layers

Recommended Posts

Hello, i have problems with my layers ...


This is my code


Mi player has

this.body.collideWorldBounds = true;;



var self = this;; ='map');'tileset');'1556');'1557');'1558');'1559');'12021');'8076');'15118');'15229');'5001');
        self.maplayer1 ='Tile Layer 1');
        self.maplayer2 ='Tile Layer 2');
        self.maplayer3 ='Tile Layer 3');
        self.maplayer4 ='Tile Layer 4');, 10000, true, self.maplayer2);, 10000, true, self.maplayer3);, 10000, true, self.maplayer4);

self.maplayer1.inputEnabled = true;


const player = new Player({
            x: Math.floor((Math.random() * 300) + 1),
            y: Math.floor((Math.random() * 500) + 1),
            body: 'human_naked',
            nickname: 'nat' + Math.floor((Math.random() * 1000) + 1),
            head: 'elf_head_2',




And my update is

var self = this;, self.players[0]);, self.players[0]);, self.players[0]);


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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.