Hello Guest

Author Topic: How to use the new zoom scale feature?  (Read 3243 times)

zeroc

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 7
    • View Profile
How to use the new zoom scale feature?
« 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.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: How to use the new zoom scale feature?
« Reply #1 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.