Hello Guest

Author Topic: How to set up 2dtk Camera  (Read 3888 times)

Mikael1987

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 13
    • View Profile
How to set up 2dtk Camera
« on: June 23, 2013, 04:45:13 pm »
I've been messing with the settings for the past 2 hours and I just can't figure it out.
I have all my sprites collections set to use "2dtkcamera".
What Im basically trying to accomplish is to have a 480x320(pixel view on the camera) no matter the resolution(scalling up for higher resolutions). Any insight? I've tried setting the 2dtkCamera resolution to 480x320 and also in the build settings(when i build and run) to the same values.
thanks in advanced.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: How to set up 2dtk Camera
« Reply #1 on: June 23, 2013, 06:38:23 pm »
Create a tk2dCamera, set native resolution to 480x320.
Tick Force editor resolution, and set it to the preview resolution, eg. 480x320 for now. (not REALLY necessary, but makes things a bit easier to understand).

Add ONE override, and leave it at defaults. That will scale any resolution to 480x320 (but will scale the largest axis, leaving either extra information on the width or height).
If you want it to non-uniformly scale to fill the screen at ANY resolution, change the override "Auto Scale" to "Stretch to Fit".

That is it, nothing else should be required.

Mikael1987

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: How to set up 2dtk Camera
« Reply #2 on: June 23, 2013, 06:58:26 pm »
Thanks a lot again,that worked perfectly,Id swear I try that but i wasn't getting the desired results so I probably missed something. Thanks for replying on a sunday!You're awesome ;D!