Hello Guest

Author Topic: [Unity] TK2DTiledSprite dimensions wrong with half transparent sprite  (Read 4132 times)

alex.seeck

  • Newbie
  • *
  • Posts: 18
    • View Profile
I have a problem with scaling a tiled sprite across a certain distance with a striped line. I calculate the dimensions to scale along the x-axis. If I do this with the stripe, which is half transparent on the left half and half opaque on the right half of the sprite, it seems to be scaling by half the speed because it only takes the actual opaque part into account. As soon as the opaque part is finished it starts immediately with the next at the right position because of the delay in distance.



I don't know how to explain this better.
Is this easy to solve? How do I get it to stretch the mesh across the transparent parts of the texture also? Or is there another way to do this?
« Last Edit: July 06, 2015, 08:55:32 am by alex.seeck »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Hi, easiest way to do this is to select that sprite and "Disable Trimming" on it.

alex.seeck

  • Newbie
  • *
  • Posts: 18
    • View Profile
Ah ok,

thanks for that. Meanwhile I shifted the sprite so the opaque part got split wrapping the transparency in the middle which also worked.