How to select tiles for tile map collision group

#1

So, I’m trying to make a simple top down JRPG style game, and I’m using tilemaps. My understanding is that I can assign different sets of tiles within a single tile source to different collision groups, and create different interactions that way. I’m trying to create walls right now.

So far I’ve created a collision group called “walls” within my tilemap, and have selected the tiles that are supposed to stop the player from moving through. However, I have my editor console log any “collision_response” message and I’m getting messages for every tile basically, until the editor I’m guessing refuses to print any more debug messages.

Am I selecting tiles properly? When I click on tiles with the collision group selected, they are outlined with turquoise. But I can’t deselect them. Is there a step I need to take to select the tiles for the collision group properly?

0 Likes

#2

Welcome to the forum! I realised that we didn’t have any example showing how to set up tilemap collisions so I created one for you. Please take a look at this example and see if it becomes clearer:

3 Likes

#3

Wow. Thanks alot. I managed to get it to register some collisions now.

Defold community is clearly something special. Thanks for taking the time to write this up.

I’m getting some collisions registering in the wrong places, and I think it’s because my tilemap is bigger than I needed. There’s no way to modify tilemap size within defold, is there? So I would need to use Tiled?

2 Likes

#4

:+1:

The tilemap is as big as the blinds of the area where you have placed tiles.

You can enable physics debug to see what’s going on.

1 Like