How do I make a slight sharp corner with a Sprite Shape?

I’m on Unity 2021.3 and 2D SpriteShape 7.0.6
I have a Sprite Shape that’s a thin platform and want it to step down/angle downwards.

But whenever I try to do it, it adds unwanted end caps like in the image below.
I want the sprite to be bent at an angle but still connected, not have two overlapping pieces.

I want to do this a lot, for other shapes, including closed ones too, so I hope there’s a solution that isn’t tediously hacky.
8398083--1108599--upload_2022-8-29_10-31-29.png

8398083--1108602--upload_2022-8-29_10-31-57.png

8398083--1108608--upload_2022-8-29_10-41-29.png

Ferr used to be able to do this but I can’t find the option to do the same with Sprite Shapes.

Hello,

You can achieve that outcome using the Stretched Corner mode on the Sprite Shape Controller component.
Sprite Shape Controller component > Edit Spline > Corner > Change to “Stretched”

More details here: Sprite Shape Controller | 2D SpriteShape | 7.0.7

3 Likes

@DanielTanBK
Oh, that’s where the setting is. Thanks so much!

Stretched corner mode does not solve all of these issues. It needs the ability to adjust an offset for how far the caps/book ends set in the sprite editor stick out. I run into a lot of overlap issues. Ferr handles this better(It does a lot of things better). Many of their features should be added to sprite shapes, especially since Ferr is now an abandoned asset. I had to abandon Ferr do too texture issues. Once I published to android devices, the edge textures would randomly disappear. At least sprite shapes do not have this issue, but I am struggling to get it to look as good as Ferr was able to accomplish.

Hello, could you elaborate on this or your use case? Or how Ferr solves this issue for you?
In Unity, the 9-slice borders in the sprite editor allows users to define how much of the edge sprite to be used as cap ends, you can reduce the size of the borders to reduce overlaps
9043633--1249174--Unity_gk9VwVm9yy.png

1 Like

I have done that, however the problem is that it creates a gap in the tiling. Ferr2D has a cap offset. The only work around I found is a cheap hack. I create multiple slices of the same sprite, one for the left side and one for the right. It’s not optimal but it kind of works. It gets a little funky when it tiles beyond a certain length. It’s more difficult to get the textures to blend.

Thank you for the feedback, we will take note of this and may consider it in future releases of the SpriteShape package

I’d like to second this feature request. I think it is also important to consider collision in this use case as well. I believe Ferr provided some configurations around the collision generation for caps. For my purposes having the collider follow the spline would be sufficient, if we have a cap offset.
Is there somewhere we can track this feature request?

Currently no, but any future implementations of 2D features in the editor would be reflected in our roadmap here