- Home /
Collision and layering for 2D top down project with hand drawn backgrounds
Hello! I'm trying to figure out what would be the "best" way to work with collisions and object layering for a 2D project with hand drawn backgrounds. My main question is about the layers, but I'll take the opportunity and ask about the collisions too.
I'm going to use the following Legend of Mana remaster screenshot as an example, with some parts highlighted for easier understanding:
First the layers: Suppose I have a hand drawn background as a single image, similar to the one shown above. There are some parts of it that I want to always be above the player (red highlight), while some other parts can be in front or behind of him (blue highlight). Should I cut these elements in the original image and create separate images with transparent background for them? Then in Unity I would have the original image as an object below the player, the red highlighted part as another object above the player, and the blue highlighted part also as another object (or multiple objects) with an attached script to take care of the layers management. Is that a valid approach?
Now for the collisions: I recon there are multiple ways to do this, but when you're working with a background that can have mutiple shapes and isn't as square as most tiled maps, what would be the best approach? Invisible walls with edge colliders?
Thank you for the help! Hopefully this can help me and also other people with the same questions in the future.