- Home /
Question by
mysterion · Jun 08, 2020 at 04:09 PM ·
2d-platformer2d-physicsslicing
2d Collider matching sprite in editor
I currently have a 2d box collider attached to a sprite that I will be using as platforms. The sprites are 9-sliced in order to fit the aesthetic of the game.
The problem I have is that I would like this sprite to be a prefab that I can bring into the level editor, change its shape then have the box collider match its shape without having to manually change the collider for each platform.
Should I be using a different collider?
Is there an alternative to 9-slicing that may work better?
Do I need to write a simple script to make the box collider size match the sprite size? Does one exist already?
Comment