Hello Guest

Author Topic: Batching with non Vector3.one Scale  (Read 3959 times)

tumashov

  • Newbie
  • *
  • Posts: 2
    • View Profile
Batching with non Vector3.one Scale
« 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.
« Last Edit: June 06, 2013, 09:41:46 am by tumashov »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Batching with non Vector3.one Scale
« Reply #1 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.

tumashov

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Batching with non Vector3.one Scale
« Reply #2 on: June 06, 2013, 10:08:05 am »
Thanks! Non uniform Z-axis fork fine.