Hello Guest

Author Topic: Changing ortho size breaks prefab?  (Read 4701 times)

ryf9059

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 41
    • View Profile
Changing ortho size breaks prefab?
« on: May 30, 2013, 03:17:27 pm »
I have a prefab consisting of several sprites closely placed together. Those sprites are from collections with same target height and ortho size, but didn't use 2dtk camera, I notice one thing, if the ortho size is changed then the prefab breaks: the distance between those sprites gets longer since the sprite themselves get smaller. I understand the reason for breaking prefab but what should I do to avoid the breaking under different resolution if not using 2dtk camera? BTW I'm don't know about the workfloat of setting up project to run at different resolution if not using 2dtk camera.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Changing ortho size breaks prefab?
« Reply #1 on: May 30, 2013, 04:09:39 pm »
1. Pick one ortho size. Don't change it in the sprite collection.

If you don't understand how it works for different resolutions, wait for the tk2dOrthoCamera (pushed back to 2D Toolkit 2.1 now, I think). It will have overrides like the tk2dCamera.

ryf9059

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: Changing ortho size breaks prefab?
« Reply #2 on: May 30, 2013, 04:56:21 pm »
1. Pick one ortho size. Don't change it in the sprite collection.

If you don't understand how it works for different resolutions, wait for the tk2dOrthoCamera (pushed back to 2D Toolkit 2.1 now, I think). It will have overrides like the tk2dCamera.

If I wait for td2dOrthoCamera, can I use a normal ortho camera with fixed collection ortho size? I mean, when converting to the new camera when 2.1 is out would I have any conversion issues from the old settings?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Changing ortho size breaks prefab?
« Reply #3 on: May 30, 2013, 05:01:15 pm »
The one thing to remember is to pick a setting in the sprite collection and stick with it. So pick something that works best with your physics, doppler, etc. The camera doesn't really matter.

The tk2dCamera will just do some projection matrix tweaks to change it to work on other cameras, you don't change the settings on the sprite colection ,etc.