0 votes

I want to create a tilemap composed of two layers. A front layer with collision and a background layer without collision. This two layer will contain the same tiles.
In Godot 3.5, collision was defined in the tilemap node so I can perform this easily. Now it's defined in the tilesets and I cannot figure out how to do the same thing.

Can I create a single tilemap node with two layers from the new layer system and be able to disable collision in one of them ?

If not, can you create two tilemap sharing the same tileset but deactivate collision for one of them ?

Thank a lot,

Godot version 4.0
in Engine by (60 points)

A good question actually! I couldn't find any easy way to do this, except doing a second tileset without collision (copy and remove physics layer). Could be automated with a script of course...

I have a work around by creating a tilemap only for contact and make it invisible but it's not optimal. It work for me because contact polygon are simple in my case and identical for all tile. But it's pretty weird that collision as change this way, it could be interesting to add collision on/off in the layer menu.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.