Hello Guest

Author Topic: Is it possible to acces the functions of the unity camera with the tk2dcamera?  (Read 3902 times)

lugmaster

  • Newbie
  • *
  • Posts: 2
    • View Profile
Hi,
bought toolkit2d yesterday, before i was working on a touch screen script. Need to get this line wokring:
Vector2 touchPosition = Camera.main.ScreenToWorldPoint(touchScreenPosition);

Is it possible to acces the same function with the  tk2dcamera?
tried it with tk2dCamera.ScreenToWorldPoint(touchScreenPosition);

If someone knows an answer would be fine, checked the search function, but didnīt find an answer what i made wrong ...

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Camera.main will work fine, but your camera needs to be tagged as "MainCamera" for this to work.

lugmaster

  • Newbie
  • *
  • Posts: 2
    • View Profile