Open Haddicus opened 6 years ago
Here's the sprite I'm trying to use for the test.
i'm noticing this problem when a parent gameobject has different scale.
update to this: I have found some issues. (Same applies to Triangle methods) inside GenerateVoronoiPieces 1) store the originalscale local scale in a separate vector3, set the origScale = the source.lossyscale at the bottom of the same method, set the source localscale to 1) inside GenerateVoronoiPieces set the piece localscale to the source lossyscale inside calcUV
change the textHeight and texWidth to divide by losscale instead of localscale.
Lastly, inside: the getRect(GameObject source) method, set the return to: return new Rect(sr.bounds.extents.x -1, sr.bounds.extents.y -1, sr.bounds.size.x 2, sr.bounds.size.y 2);
if that doesnt fix it also set change it from Renderer to SpriteRenderer
Was hoping to get this working, but the segmentation's seem not to be aligning properly with my sprites. I thought it was an issue with using a spritesheet, but have the same result when generating from an individual sprite.
Fragments Generated in editor:
Generated segments:
Not sure what's going on here, or if this is just broken in 2018.1.1f1