Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: aer0ace on March 19, 2015, 11:17:30 PM
-
I'm having an issue with a Box Collider on a UIButton.
I programmatically assign a pivot to the UISprite (say, lower left corner) and assign a UIAnchor component (say also lower left).
This correctly positions the geometry against the lower left corner, but the box collider seems to only detect collisions when the mouse is on the left half of the button, when I would want it to be over the entire button.
Anything I'm doing wrong here?
-
Actually, figured it out.
After setting the pivot on the UISprite, call ResizeCollider(), even though it's set to auto resize in the script properties.