totallybueno Posted March 15, 2018 Share Posted March 15, 2018 Hi, I have this basic platform game and I would like the hero to jump through the platforms, from underneath to the top of the platform, but I´m not being able to do that and the head of the hero collides with the bottom of the platform even when I set the collideDown of that tile (actually, to all the tiles of that layer) to false. What am I missing? this.platformsLayer = this.map.createLayer("platforms") this.map.setCollisionBetween(1,50, true, "platforms") var tilesArray = this.platformsLayer.getTiles(0,0,this.game.world.width, this.game.world.height) for(var i=0;i<tilesArray.length;i++){ tilesArray[i].collideDown=false tilesArray[i].setCollision(true, true, true, false) console.log("All set to false") } Link to comment Share on other sites More sharing options...
flow Posted March 15, 2018 Share Posted March 15, 2018 Funny I was just reading this old post when I saw your question: Link to comment Share on other sites More sharing options...
totallybueno Posted March 16, 2018 Author Share Posted March 16, 2018 I thought I´d be an easier way to do it... anyway, for my game I think I´m gonna be able to use hero.body.checkCollision.up = false... I still don´t get why tilesArray[i].collideDown=false is not working as I was expecting. Link to comment Share on other sites More sharing options...
Milton Posted March 16, 2018 Share Posted March 16, 2018 41 minutes ago, totallybueno said: I still don´t get why tilesArray[i].collideDown=false is not working as I was expecting. Had a quick look at the source (collideSpriteVsTilemapLayer), it (collideDown etc) doesn't look implemented? I guess you could just set the collide processCallback, and return false... Link to comment Share on other sites More sharing options...
totallybueno Posted March 19, 2018 Author Share Posted March 19, 2018 Check your inbox messages @Milton Link to comment Share on other sites More sharing options...
Recommended Posts