Author Topic: sphere collider in a ngui hierarchy question  (Read 1338 times)

mallenroh

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
sphere collider in a ngui hierarchy question
« on: January 02, 2014, 11:08:09 PM »
I created a game object ( a sphere ) that I am using to be mouse pickable via a script. it works when the sphere is in the default game object space. I create a ngui camera, and parent the sphere there (as I want to be able to drive it in the ngui layer) but then the sphere is no longer pickable. How do I get the sphere to sort on the ngui camera hierarchy?
Thanks,

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: sphere collider in a ngui hierarchy question
« Reply #1 on: January 03, 2014, 03:58:42 AM »
When UIRoot is set to "world" mode, NGUI will perform a raycast into the screen and use whichever collider it hits first. For this to work, your sphere should be on the same layer as your UI. If it's not, then it should not be a part of your UI hierarchy, and the camera that draws it also needs a UICamera script attached.