Hello Guest

Author Topic: Problem creating sprite collection with use tk2camera checked in settings  (Read 6483 times)

mamamia

  • Guest
Hi,

I have my tk2camera with an override resolution of 960x640. I create a sprite collection and if I check the use tk2camera option in settings and do a commit, sprites become huge :/ (I have the allways pixel perfect check set to true in my sprites) .  Doesn't this option (the use tk2camera) set all sprites scale correctly to make the sprite allways pixel perfect?

I'm a bit lost here. If I don't use the tk2camera option everything is correct size, but I'm worried about this option not acting as I expected and I need everything gets resized to correct size when moving to a bigger resolution.

Now I don't know if it is a good option to use the "use 2dtoolkit camera" when creating the sprite collections.



Thanks in advance.
« Last Edit: November 20, 2012, 06:52:36 pm by mamamia »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Problem creating sprite collection with use tk2camera checked in settings
« Reply #1 on: November 20, 2012, 09:43:11 pm »
You should set "Use tk2dCamera" in the sprite collection settings if you want to use it with a tk2dCamera.

Can you post a screenshot of your tk2dCamera settings?

mamamia

  • Guest
Re: Problem creating sprite collection with use tk2camera checked in settings
« Reply #2 on: November 20, 2012, 09:55:13 pm »
Here you have the screenshot:

http://s11.postimage.org/ag4tea0ar/camera.jpg

Thanks in advance for your time.


unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Problem creating sprite collection with use tk2camera checked in settings
« Reply #3 on: November 20, 2012, 10:40:17 pm »
What does your game view look like?

mamamia

  • Guest
Re: Problem creating sprite collection with use tk2camera checked in settings
« Reply #4 on: November 20, 2012, 10:52:20 pm »
Sorry don't know what you mean, you want to see a shot from my game?

If you are asking what happens, the problem is that a sprite gets huge and covers a lot more than the screen space.

If you need a screen shot I can upload it, but you will see just some pixels of the sprite I'm using convering all screen.

Thanks in advance.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Problem creating sprite collection with use tk2camera checked in settings
« Reply #5 on: November 20, 2012, 11:14:34 pm »
No, I mean the "Game" window in Unity. If you can take a screenshot of the Game and Scene views side by side that will be great.

Also, could you please check the sprite that the scale is 1, 1, 1...

mamamia

  • Guest
Re: Problem creating sprite collection with use tk2camera checked in settings
« Reply #6 on: November 21, 2012, 07:12:40 am »
Before uploading the shots (I'm under NDA) I must say that when I press 1:1 button scale gets 320,320,320 :/. If you still need the screenshots let me know and I will try to upload them.

Thanks in advance.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Problem creating sprite collection with use tk2camera checked in settings
« Reply #7 on: November 21, 2012, 08:41:22 am »
Looks like there is something dodgy going on.
When you press 1:1 on a sprite with "Use tk2dCamera" in a scene with only a tk2dCamera (and no pixel perfect helper, etc), the scale should be 1, 1, 1.

Can you manually change this to see if it looks the right size?

Also, please email support@unikronsoftware.com - I check that far more often than the forum

mamamia

  • Guest
Re: Problem creating sprite collection with use tk2camera checked in settings
« Reply #8 on: November 21, 2012, 01:30:02 pm »
I have sent you an email but put the information here anyway:

This is what happens playing with scale:

1) I set the use 2dtkCamera in the collection.
2) I press 1:1 button in editor after I put an sprite based on this collection
3) The scale of the sprite becomes 320,320,320 and it is huge.
4) I manually change scale to 1,1,1 and it gets back to the correct size it should have been after pressing the 1:1 button in step 2.

Hope this will be of help to finally figuring out what's the problem.

Thanks in advance.
« Last Edit: November 21, 2012, 04:03:14 pm by mamamia »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Problem creating sprite collection with use tk2camera checked in settings
« Reply #9 on: November 21, 2012, 06:55:51 pm »
This shouldn't really happen, though its hard to say what is wrong from your description.
Can you try to set up an isolated test case for me please? If it breaks in there - I'll have something to sort out, if it doesn't - you'll likely have figured out what is wrong.

support@unikronsoftware.com if you need to send something.

mamamia

  • Guest
Re: Problem creating sprite collection with use tk2camera checked in settings
« Reply #10 on: November 21, 2012, 10:24:03 pm »
Am email with a test project and instructions to reproduce the problem has been set to the preivous account. By the way, I wouldn't use an email in the form you have post it. Spiders trace this information and use it to send SPAM, just a piece of advice :).

Cheers.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Problem creating sprite collection with use tk2camera checked in settings
« Reply #11 on: November 21, 2012, 11:30:47 pm »
Hey mamamia.
Found the bug - it was a really obscure one for sure. Don't think I'd have found it without the repro case. Sent you a patch, and as usual this will be in the next release.

To anyone else having the same issue, you should just set scale to 1,1,1 to fix it.
If the sprite collection has "Use tk2dCamera" set
AND
you''re displaying it on a tk2dCamera...
the scale should always be 1,1,1 unless you want to display it larger or smaller than it should be.

mamamia

  • Guest
Re: Problem creating sprite collection with use tk2camera checked in settings
« Reply #12 on: November 22, 2012, 09:23:15 am »
I'm very pleased you found out the problem.

I think you missed to attach the file to the email :). Could you resend it please?


Thanks in advance.