Hello
Guest
Home
Help
Search
Login
Register
2D Toolkit Forum
»
2D Toolkit
»
Support
»
tk2dCamera WorldToScreenPoint?
« previous
next »
Print
Pages: [
1
]
Author
Topic: tk2dCamera WorldToScreenPoint? (Read 4759 times)
jorgar
2D Toolkit
Newbie
Posts: 3
tk2dCamera WorldToScreenPoint?
«
on:
July 03, 2016, 04:00:45 pm »
Hi, what is the equivalent of Camera.WorldToScreenPoint() with a tk2dCamera? I've reading the documentation but i don't see any similar method.
Logged
jorgar
2D Toolkit
Newbie
Posts: 3
Re: tk2dCamera WorldToScreenPoint?
«
Reply #1 on:
July 12, 2016, 12:05:03 pm »
Anyone know?
What I'm trying to do is get the Touch.position and translate a gameobject to that position. Touch.position returns screen space but i have to give to gameobject the position in world space values. With a normal camera i would use camera.WorldToScreenPoint but with a tk2dCamera it seems doesn't work.
«
Last Edit: July 12, 2016, 12:32:51 pm by jorgar
»
Logged
unikronsoftware
Administrator
Hero Member
Posts: 9709
Re: tk2dCamera WorldToScreenPoint?
«
Reply #2 on:
July 13, 2016, 10:52:08 pm »
tk2dCamera has a Camera component on the same game object, just get the camera component and call WorldToScreenPoint on it.
Logged
jorgar
2D Toolkit
Newbie
Posts: 3
Re: tk2dCamera WorldToScreenPoint?
«
Reply #3 on:
July 14, 2016, 01:55:42 am »
Thank you for answer! I didn't get the camera component. Now is working, thank you!
Logged
Print
Pages: [
1
]
« previous
next »
2D Toolkit Forum
»
2D Toolkit
»
Support
»
tk2dCamera WorldToScreenPoint?