Hello Guest

Author Topic: Finding objects local position with respect to Camera Screen.  (Read 3288 times)

RakeshChatra

  • Newbie
  • *
  • Posts: 33
    • View Profile
Finding objects local position with respect to Camera Screen.
« 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..

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Finding objects local position with respect to Camera Screen.
« Reply #1 on: October 24, 2013, 10:19:11 am »
You needy camera1.ScreenToWorldPoint, and then camera2.WorldToScreenpoint to get the corresponding point in camera 2.