How to set the collision layer in a gridmap?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Gokudomatic2
:warning: Old Version Published before Godot 3 was released.

Quite strangely, it seems that every tile that has a staticbody is set to collision layer 1. Is it possible to change that?

Gridmap unfortunately doesn’t support collision layer or collision masks yet. That will probably come in 3.0 while 3D is being focused on.

CowThing | 2016-06-26 04:10

Seems right. I guess I have to reserve the layer 1 to the gridmap.

Gokudomatic2 | 2016-06-26 08:56

:bust_in_silhouette: Reply From: Zylann

You can change the collision layer of a tilemap with the layers property. I dont’t think you can do that per tile.

EDIT: answered too fast. Gridmap indeed doesn’t have a setting to change the collision layer yet. Will most likely be available in 3.0.

Sorry but I’m talking about gridmaps. Tilemaps are for 2D.

Gokudomatic2 | 2016-06-26 08:55

Oops I answered too fast. Gridmap doesn’t have a setting for this indeed…

Zylann | 2016-06-26 12:09

Anyone know what’s the status of this issue now? Is there a programmatic way to workaround this limitation?

kapi | 2017-07-15 03:18