0 votes

Hey,

I'm using a tilemap with 16x16 tilesets. Some of these tiles have a collision defined.

Is it possible to automatically merge these collision shapes to one big collision shape together?

So lets say I have two 16x16 collision shapes next to each other, I then want to have one 32x16 collision rectangle. Is this possible?

Thanks!

Godot version Godot_v3.4-stable_mono_x11_64
in Engine by (710 points)

This is how TIleMap works, it is always merged into one collision instance. It is impossible to normally detect collisions of individual tiles.

If You need this shape to be copied for some other instance You can use Geometry node. Its methods allow to build polygons based on vector2 arrays. This shouldn't be to hard to feed all collider tiles positions to this method, create collision shape with polygon shape, and apply Geometry result as a new shape.

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 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 webmaster@godotengine.org with your username.