Jump to content

Quick question on collison for specific tiles


Recommended Posts


I have added my tilemap and I think added that to a layer. And i've also created my player sprite. I am re-making gunsmoke (youtube gunsmoke NES game). 


// Tiling*
		map = this.add.tilemap('map', 64, 64);
		layer = map.createLayer(0);


		player = game.add.sprite(600, 2900, 'player'); // create player sprite
		game.physics.enable(player, Phaser.Physics.ARCADE); // enable phyics to player 

I want to have specific tiles to prevent my player walking past them. It's the sides on the image image below..

How do I make them solid and not able to walk through?

3vgzf9.jpg (



Sorry for my bad English. I have looked through Phaser Examples but I cannot find what I am looking for.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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