I need to be able to add colliders to specific tiles that have walls on them.
For instance this above tile needs a collider on the wall portion (where the red follows would be the collider shape), but not on the brick floor portion because the player will be walking on that part. I can’t seem to figure out how to go about implementing this custom collider shape however. Modifying the sprite outline to only contain the wall part actually prevents the part of the sprite not contained in the outline from rendering, so that’s clearly not the right solution.
If I understand correctly, inspect the image.
Tick Generate Physics Shape.
Click the Sprite Editor button.
Change the dropdown in the upper left from Sprite Editor to Custom Physics Shape.
Click Generate. This will do a fair job of wrapping the collider edges around the sprite.
Fiddle with the vertices to get it the way you want, then click Apply.
Okay, it looks like that is working correctly. Now I’m curious how I would go about specifying the center tiles to have no Physics Shape / Collider at all. Simply creating a custom physics shape and then deleting all vertices of the generated polygon doesn’t seem to work.