Hello Guest

Author Topic: What is the difference between orthographic and 2DTK cameras?  (Read 8071 times)

Disastercake

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Disastercake
What is the difference between orthographic and 2DTK cameras?  I can't seem to find any documentation on the 2DTK camera to know why I would want to use it over orthographic. In fact, even the 2DTK documentation just keeps talking about orthographic cameras and never once mentions the 2DTK camera.
Working on Soul Saga, an upcoming anime adventure RPG game by Disastercake.
www.disastercake.com

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: What is the difference between orthographic and 2DTK cameras?
« Reply #1 on: May 14, 2012, 08:51:51 am »
Hi,

The tk2dCamera uses a slightly different approach - basically each world unit in the tk2dCamera is 1 pixel, making it really easy to position things. It also auto-corrects itself, so 1 world unit = 1 pixel always, regardless of resolution. It also supports anchors, so its much easier to create interfaces in it. The reason the documentation just goes through the normal camera stuff is the concepts are pretty much the same regardless of camera type.

Here is the doc page about tk2dCamera, in case you've missed it:
http://unikronsoftware.com/2dtoolkit/doc/tutorial/tk2dCamera.html

The downsides to it
- currently theres a bug in unity which draws the camera preview window incorrectly.
- the same bug means the in-scene camera bounds drawing is wrong.

fattie

  • 2D Toolkit
  • Full Member
  • *
  • Posts: 106
    • View Profile
Re: What is the difference between orthographic and 2DTK cameras?
« Reply #2 on: June 17, 2012, 11:04:01 am »
To be clear ... with the excellent 2DTK camera, physics would not work or be dramatically different, if you are using normal Unity physics .. correct?   (In short, you's have to dramatically change the value for gravity, among other things, I think.)  Since a pixel kind of becomes a meter.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: What is the difference between orthographic and 2DTK cameras?
« Reply #3 on: June 17, 2012, 11:45:16 am »
Yes, you'd have to change physics settings to compensate - once that is done, there shouldn't be major issues. Likewise if you use too small an ortho size, you'd have to change the physics there too.