Hello Guest

Author Topic: doubling size of slicedsprite dimensions issue!  (Read 3209 times)

mangax

  • Newbie
  • *
  • Posts: 1
    • View Profile
doubling size of slicedsprite dimensions issue!
« on: August 10, 2013, 10:45:52 pm »
hello! i looked around in forum and i didn't see anyone mentioned this.

i have a sliced sprite as background displayed behind content, i wanted to make user able to zoom in the content.
i multiply content size (x and y) by 2, so it doubles the size for zoom in effect easily.

i tried to do same for the sliced sprite (so it retains background design around content), by doubling the amount of x and y in dimensions attribute.
but strangely, the sprite expanded more than the intended size!!

they both were perfectly aligned before zooming in, but after multiplying dimensions by 2,,, it was more in x axis and even more in y axis! it is very noticeable!

isn't multiplying by 2 means it will expand exactly twice the size?
to fix this issue i was forced to multiple x by 1.95 and y by 1.88 so it doesn't expand too much.

i dunno why this happened? any ideas?
« Last Edit: August 10, 2013, 10:56:58 pm by mangax »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: doubling size of slicedsprite dimensions issue!
« Reply #1 on: August 11, 2013, 06:03:30 pm »
Nope. Can't see any reason this could happen, the values are just multiplied in there, so 2x should be exactly 2x the size.
Unless... you're using a perspective camera and the sprite is further behind or something similar like that?