Author Topic: Convert postionLocal between parent and child in Ngui  (Read 1365 times)

hanyu279

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Convert postionLocal between parent and child in Ngui
« on: October 06, 2014, 11:23:33 AM »
i have  hierarchy
level 1. game_obj1
level 2.                 game_obj2
level 3.                      game_obj3

How to convert postionlocal of game_obj3  to postionlocal of game_obj1 ?
And game_obj1 to game_obj3 ???

Thanks all !

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Convert postionLocal between parent and child in Ngui
« Reply #1 on: October 07, 2014, 10:00:00 AM »
Same way as with any other game object in Unity. Use the transform.LocalToWorld/WorldToLocal.