Hey
It’s been almost 2 years that I’m hoping to use SpriteShape to build my 2D metroidvania.
For prototyping it feels very promising but I’m at a point where I’m looking at a more long term solution.
My main grudge with the tool is that I can’t find ANY WAY to create holes in the shape collider once it’s created.
In a metroidvania most of the levels are basically “boxes” with interconnections. For my team (a very small one) it’s IMPOSSIBLE to plan all of those right from the start.
Bottom line, we need to be able to cut holes in those “boxes” while the levels expends. We tried to push further the time where we’ll have to deal with it, working on other stuff, thinking that this feature would come, I mean it obviously has to come…right ? ^^’
Anyway, @Venkify , @rustum , should I just drop it for good and find another tool to build my 2D game ?
Should I wait a bit more and you guys are working on it ?
Or is there any solution that I’m not aware of ?
Thank you for your work, I really want to love and use Sprite Shape, I can see a great potential, please, make it the tool that 2D creators were waiting for <3
Oh…
Bonus question…
What about 2D depth of field in URP!? The world needs it !!!
I have never heard of such an approach. Yeah, I guess if you had a functioning 2D Minecraft engine perhaps that would be a solution but traditionally one builds a level out of parts, and each part has a collider.
This means for a metroidvania kinda level you have a floor, a ceiling, optional walls, furniture, levels, etc. and each one has a collider on it.
There’s nothing to cut. If you need a seekrit passage wall (eg, a wall or floor or ceiling that looks solid but you can sneak through), then make a separate prefab with the same sprite, but leave out part of the collision polygon.
This isn’t ideal but you could place trigger box colliders where you need your player to ignore the shape collider. OnTriggerEnter2D to switch the character to a layer which ignores the sprite shape collision, but then you’d need another one or another method of putting it back.
Like Kurt said, though, it sounds like you should rework your approach to colliders from the ground up to me.
Hello guys, I appreciate the time you took to answer.
However are you familiar with the spriteshape tool ?! I mean, I dont think I’m using it for anything else that what it supposed to be.
I didnt hack it in anyway, I just use the tiling functions provided et the composite collider generated.
Separating ceiling from walls ans from ground would just annihilate the benefits of thé spriteshape itself : sprite for corners, for different angles and so on…
make visual representations of the level in your game
make appropriate colliders to match those visuals
My post is simply pointing out that those are both traditionally done in the “positive” or “additive” sense: you start with empty, you add both visuals and colliders to it, voila, your level is complete.
If you wish to do it another way than this, it seems you might need to create some special “collider cutting” tooling.
I don’t see how separating out the entities would eliminate the need for SpriteShape. For each section you have another SpriteShape component.
[----one gameobject with SpriteShape component on it----] *** a hole **** [—another gameobject with a SpriteShape—]
Each SpriteShape component can reference the same SpriteShape Profile.
I hear your points.
In my case though, spriteshape is not used to create grounds, but “rooms”.
Think metroidvania, my levels are basically interconnected rooms, these interconnections are sometimes created later on.
So here it a suggestion :
If SpriteShape collider generation was creating different colliders depending on angles (ground and ceiling / wallls) I’d be able to adjust more easily these collider holes, on a composite collider, it’s impossible.
Also having different colliders would allow us to have different layers/behaviours on ground and walls for our player !