- Home /
How can I disable collision for 1 tile?
I have a platform which exists of 4 tiles. The top 2 tiles have a small collision shape. The bottom 2 tiles should have no collision.
I tried removing all custom physics shape points on the bottom 2 tiles, but somehow it still generates an outline around it. Even though I have the 'generate physics shape' setting turned off:
A third option I read somewhere is to set the tile collidertype. link text However whatever tile I click in my tile map, or my palette, the property is always greyed out.
Does anyone have an idea how to have a tile collisionfree?
thanks!
Can you not just delete the collider in the inspector when you select the game object??
You should be able to edit / delete the collider component attached to the game object in the inspector
Hi, this is about 1 tile in the tilemap component. So not a game object. All tiles can be edited using the sprite editor. However when I remove the physics shape completely from a sprite (tile), then it will get a default shape which I don't want.
An option would be to remove the collider/physics shape completely and then when you have your scene setup, use the polygon collider and edit it to get the shape you need.
I would have guessed that is a lot of work extra. But maybe you are right that that is much simpler
Answer by blu3drag0n · Nov 01, 2019 at 03:26 PM
Hi,
I was dealing with this issue since 2 hours now and unfortunatly there is nothing documentated. Even there are not much finding the forum nor reddit nor stackoverflow and so on... BUT i figured it out whats the point! What you need to do is go into the folder with all the generated Tile Assets. And then select (Multiselect & change is possible) the specific tiles you DONT want to have a shape generated the collider type to "None". By default its "Sprite" , due to the fact that you usually import it as a Sprite. If you have a custom physics shape on a single tile then you have to choose "Sprite" still. You will find these Tile Assets in the folder that you have selected when dragging&dropping a sprite into a Tile Palette and Unity asks you to choose a folder where to store all the generated Tiles.
Bingo!
KR
And for anyone who uses rule tiles, you also have to select the collider as "None" for the selected tile inside the inspector of your rule tile. Like this:
Answer by Moreus · Oct 20, 2020 at 04:46 PM
in tiles folder check your tiles
Answer by Squitz · Nov 01, 2019 at 07:17 PM
What about putting it on a seperate tilemap without collisions?
Answer by tomiu · Aug 03, 2021 at 07:47 PM
If you want to make a particular tile in your tilemap not collide, you can select that tile's custom physics shape in the tilemap's sprite editor, and drag all the shape's vertex points to overlap at 1 point, causing the physics shape to have dimensions of 0.,On the custom physics shape for the tile you want to have no collision, you can drag all the vertices to 1 point so that the collider has no size.
Your answer
Follow this Question
Related Questions
Get sprite of Tile 2 Answers
Tilemap: Resizing Tiles? 1 Answer
Changing the sprite of a tile 0 Answers