Hello Guest

Author Topic: Wildcard Camera Override change in 2.0?  (Read 5506 times)

vancext

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 7
    • View Profile
Wildcard Camera Override change in 2.0?
« on: June 24, 2013, 11:29:46 pm »
Heya,

Just curious, were there changes to the Wildcard Override in 2.0? My tk2dCameras functioned perfectly on my tablet prior, and after the update, any camera that I have deleted the old override on and added a new wildcard to does not work properly now.

Every camera that has an old override on it still works properly (now with a blank name in the override GUI). Every new camera appears to be set at a slight -x,-y (or all the sprites are at a slight +x,+y). This happens on FitMode center, or FitMode constant at 0,0. Everything is at 0,0 right now for testing (camera and sprites).
« Last Edit: June 25, 2013, 12:14:57 am by vancext »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Wildcard Camera Override change in 2.0?
« Reply #1 on: June 25, 2013, 12:36:35 pm »
It shouldn't have, unless you were on a really really old version to start with? What version did you start with?

vancext

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Wildcard Camera Override change in 2.0?
« Reply #2 on: June 26, 2013, 10:06:32 pm »
Hmm... wasn't all that old. 1.8 or 1.9ish, so actually fairly recent.

Here is an attachment of my camera settings if it helps. Once again, this works fine in editor, but is not working on my Galaxy Samsung Tablet. Oddly enough, as I said before, Wildcard settings that I have not deleted and recreated since 2.0 are still working fine. Only tk2dCameras that have had Wildcard overrides added after 2.0 have this issue.

It's possible that I may be misunderstanding one of the settings as well (although I don't think I am).

I do have one other non tk2dCamera in the scene looking at the background, although there is no overlap between the two and they are both setup for separate culling. Would this cause an issue? It hasn't prior, so I'm not sure if this is the cause.
« Last Edit: June 26, 2013, 10:14:47 pm by vancext »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Wildcard Camera Override change in 2.0?
« Reply #3 on: June 27, 2013, 11:35:55 am »
What happens when you set force editor resolution = true, set resolution to the same as galaxy nexus. Set the game view resolution to the same as galaxy nexus. Is what you see in the game view the same as the device?

vancext

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Wildcard Camera Override change in 2.0?
« Reply #4 on: June 27, 2013, 07:23:26 pm »
Yep! That produces the same results. Here is a screenshot. The shopUI in the center is set to x=0, y=0, z=0. Camera is at x=0, y=0, z=-100. The force editor resolution box unchecked on run.

Also interesting, if I change the native resolution numbers in the editor, the camera moves in relation to the screen as well (both during and after run). However, changing the native resolution to the same resolution (600x1024) does not result in perfect positioning -- the sprites are correct on the x axis, but a bit low on the y axis.

I programmatically change the size of my sprites based on Screen.width and Screen.height using transform.localScale. Would that also mess with it?

Let me know if I am making some simple mistake. :)

EDIT: Apologies. After messing with it, changing Fitmode to constant and x=0, y=0 seems to have fixed it. Whenever I programmatically center a sprite, I set its XY postion to Screen.width/2 and Screen.height/2. I assume if the Fitmode is set to center, it pushes all sprites at those XY coordinates away by the difference of the camera moving from 0,0 to center, or something of the like?
« Last Edit: June 27, 2013, 08:06:54 pm by vancext »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Wildcard Camera Override change in 2.0?
« Reply #5 on: June 27, 2013, 10:30:23 pm »
 Why do you change the size of the sprites? Adjusting the tk2dCamera scale (fit vertical, etc) should give you the same results without messing with anything. I think the part you were missing is the force editor resolution thing?