1
NGUI 3 Support / Colliders and Alpha
« on: August 22, 2014, 08:16:55 AM »
Attempting to create "invisible" collider for UI.
Attempt 1: UIWidget + Collider = fail
Attempt 2: UISprite (Alpha 0) + Collider = fail
Attempt 3: UISprite (Alpha 1/255) + Collider = success
I have it working and that's great, just wondering why UICamera.lastHit.collider doesn't register unless there is some alpha there, or am I mistaken? Didn't change any other settings.
Mmmm... addendum, the panel is set to "Visible" so I am guessing it's checking for a visible component. Not 100% sure, but this makes sense. Will have to test more later.
Attempt 1: UIWidget + Collider = fail
Attempt 2: UISprite (Alpha 0) + Collider = fail
Attempt 3: UISprite (Alpha 1/255) + Collider = success
I have it working and that's great, just wondering why UICamera.lastHit.collider doesn't register unless there is some alpha there, or am I mistaken? Didn't change any other settings.
Mmmm... addendum, the panel is set to "Visible" so I am guessing it's checking for a visible component. Not 100% sure, but this makes sense. Will have to test more later.