- Home /
Custom Fill Origin
I'm working with a circle I want to segment into 16 different pie pieces.
When a piece is interacted with, it will have an animation that plays, depending on the side. I have a sprite sheet made for the animation already.
I'm using the UI Image component, set to filled, fill method radial 360, Fill Origin. The fill amount is a .0625 for each segment, because 16/1 = .0625.
I have a perfect circle segmented into 16 pieces. the problem is the 16 pieces are all the same part of the circle, not the circle as a whole, since the FILL ORIGIN is always bottom.
My question is , is it possible to have a custom Fill Origin for an image, if so how would i approach coding it?
if anyone has a different way to segment a circle please also I would love that. I've cut up circles before but it's almost impossible to put them perfectly together in unity after.!alt text
Answer by fffMalzbier · Feb 29, 2016 at 02:09 PM
The default ui shader does not support an offset for the filling. You may have to download the build in ui shader and modify it for your needs.
And is this available through the asset store? Thanks alot for the answer!
can you please show me how to find the image script. i have the same problem. thank you