Hello! Made everything the same as was shown, but have strange effect with my Tilemap Collider 2D + Composite Collider 2D, as you can see on the screenshot below. (pixel per unit is 31 here)
How can this problem be solved?
Hello! Made everything the same as was shown, but have strange effect with my Tilemap Collider 2D + Composite Collider 2D, as you can see on the screenshot below. (pixel per unit is 31 here)
I have a similar issue the composite collider doesn’t work on any of the inverted tiles.
Hi @Beatabout, hi @okilydokily1,
That’s a common problem. Try to disable the tilemap collider and enable it again to force Unity to recalculate the collider shape.
Did this fix the problem for you?
See also:
Nothing realy changes, remains exactly the same without even slight difference.
Yeah nothing is changing. I’ve tried removing the components in different orders as well.
In that case, check if the tiles are on the correct layer. If they are, remove the Tilemap collider component and readd it. You could also try to disable the children of the tilemap and re-enable them.
And check your Console in Unity. Maybe there is an error message pointing to the problem.
For me problem solves if I make pixel per unite 32, same the tilemap was sliced. If make it 31px back, issue comes back.
Changing to 32 to worked for me. (I’ve already removed the component and that didn’t work. There are no children of the tilemap yet, and no errors.)
While changing the ppu to 32 as others suggested (and force regenerating the collision box) works, it reintroduces the problem of the tiny visual gaps between the tiles.
The way I seem to have managed the solve the issue was fine tuning the collision box generation and doing it manually.
In the Composite Collider 2D setting change Generation Type to Manual and tweak Vertex/Offset Distances, then click Regenerate Collider.
I can’t say this method won’t cause any issues further down the line, but as of this lecture it worked perfectly.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.