2D Toolkit Forum

2D Toolkit => Support => Topic started by: zeroc on January 21, 2013, 06:39:09 am

Title: How to use the new zoom scale feature?
Post by: zeroc on January 21, 2013, 06:39:09 am
So I've searched around but haven't found anything on how to use the zoom scale feature.
I tried the following but no avail.

      GetComponent<tk2dCamera>().zoomScale = 0.99f;
      GetComponent<tk2dCamera>().UpdateCameraMatrix();

Any comments? Thank you Unikron for the amazing update.
Title: Re: How to use the new zoom scale feature?
Post by: unikronsoftware on January 22, 2013, 12:00:04 pm
Hi zeroc,

You don't need to call UpdateCameraMatrix after zoomScale is changed, but, you do need to have an override set up for it to work. Just the default override will suffice.

After that, simply set it to 0.5 to zoom out and 2.0 to zoom in by 2x exactly.