2D Toolkit Forum

2D Toolkit => Support => Topic started by: Emg on February 24, 2015, 08:49:51 am

Title: Scale sprite horizontally in one direction only
Post by: Emg on February 24, 2015, 08:49:51 am
In the editor I can drag and pull the side of a sprite, for example the left side, and the right side will stay as is, with the centre of the sprite changing position. Is there a way to do this in script in game? If I set the x scale i think it scales equally in both directions, keeping the centre position.
Title: Re: Scale sprite horizontally in one direction only
Post by: unikronsoftware on February 24, 2015, 10:58:49 am
The scale is centered around the pivot, you'll need to set that to get it to scale from one end.