2D Toolkit Forum

2D Toolkit => Support => Topic started by: lugmaster on April 30, 2014, 11:35:46 pm

Title: Is it possible to acces the functions of the unity camera with the tk2dcamera?
Post by: lugmaster on April 30, 2014, 11:35:46 pm
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 ...
Title: Re: Is it possible to acces the functions of the unity camera with the tk2dcamera?
Post by: unikronsoftware on May 01, 2014, 11:15:59 am
Camera.main will work fine, but your camera needs to be tagged as "MainCamera" for this to work.
Title: Re: Is it possible to acces the functions of the unity camera with the tk2dcamera?
Post by: lugmaster on May 02, 2014, 11:19:30 am
Thx  :)