Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: sk1989 on September 24, 2012, 09:11:42 PM
-
Currently i have the UIPanel springing on click to center. What if i want to spring it to a different position besides the center. I was thinking of little bit offset to the left.
right now i m using this calculations for my buttons in the panel.
Vector3 newpos = _dPanel.transform.worldToLocalMatrix.MultiplyPoint3x4(transform.position);
SpringPanel.Begin(_dPanel.gameObject,-newpos,10.0f);
-
If you want that clicked button to be offset and the rest to remain aligned, use a tween that responds to OnClick and keeps selected state.
If you want to offset the entire thing, just add an offset to your newPos