2D Toolkit Forum

2D Toolkit => Support => Topic started by: RakeshChatra on October 24, 2013, 07:54:52 am

Title: Finding objects local position with respect to Camera Screen.
Post by: RakeshChatra on October 24, 2013, 07:54:52 am
Hi, i am using two cameras for my game, one for the gameplay and other for the UI stuffs.. my problem here is gameplay camera which is orthographic size is set to 25 and UI camera orthographic size is set to 480.. there are objects in the gameplay camera whose position i want with respect to UI camera please help me to achieve this.. i tried using camera.WorldToScreenPoint but it is not in the exact position on the UI camera..
Title: Re: Finding objects local position with respect to Camera Screen.
Post by: unikronsoftware on October 24, 2013, 10:19:11 am
You needy camera1.ScreenToWorldPoint, and then camera2.WorldToScreenpoint to get the corresponding point in camera 2.