2D Toolkit Forum

2D Toolkit => Support => Topic started by: tumashov on June 06, 2013, 09:31:31 am

Title: Batching with non Vector3.one Scale
Post by: tumashov on June 06, 2013, 09:31:31 am
Not work... How i can fix it?

Parent - uniform scalable object.
Childs - tk2dBaseSprite objects with Vector3.one Scale.

p.s. in my sprite implementations work fine.
Title: Re: Batching with non Vector3.one Scale
Post by: unikronsoftware on June 06, 2013, 09:54:26 am
Either
1. Use sprite.scale to scale the hierarchy manually
or...
2. Use a non-uniform scale on ALL the sprites and their children. Easiest way to do that is to change the z axis of transform.localScale on the entire hierarchy.
Root = 1, 1, 1.0001
  Child = 2, 1, 1.0001
  Child2 = 1,4, 1.0001
Now you will be able to scale root and as long as the scale is non uniform (i.e. z != x | y) you will be fine.
Title: Re: Batching with non Vector3.one Scale
Post by: tumashov on June 06, 2013, 10:08:05 am
Thanks! Non uniform Z-axis fork fine.