[ad_1]
I’ve received some isometric 32×16 tiles
Which i divide into 4 items, as an example the highest left 16×8 piece:
What im attempting to realize, is to from this nook which is a Sprite object, generate a triangle sprite solely containing the sprite itself with out what’s within the border:
In my present try im attempting to repeat the sprite at runtime and redefine the copy geometry:
var tileSetup = tilesetSetup.TileSprite;
var copy = Sprite.Create(
tileSetup.TopLeft.texture,
tileSetup.TopLeft.textureRect,
tileSetup.TopLeft.pivot,
tileSetup.TopLeft.pixelsPerUnit,
0,
SpriteMeshType.Tight
);
copy.OverrideGeometry(new Vector2[]
{
new Vector2(0,16), new Vector2(16,0), new Vector2(16,8),
}, new ushort[] { 0, 1, 2 });
tileSetup.TopLeftNoCorner = copy;
But it all the time renders a clean picture.
Does anybody have any concepts how to do that ?
Thanks !
[ad_2]