Author Topic: Tween effetc depending on sprite's position  (Read 1305 times)

vipo

  • Guest
Tween effetc depending on sprite's position
« on: May 09, 2014, 03:45:00 PM »
solved
« Last Edit: December 05, 2022, 02:59:12 PM by someone »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tween effetc depending on sprite's position
« Reply #1 on: May 09, 2014, 11:15:41 PM »
Put a script on each of the scroll view's children that will change its scale based on the distance from the center of the scroll view. To determine the center of the scroll view, use
  1. Vector3[] corners = panel.localCorners;
  2. Vector3 localCenter = Vector3.Lerp(corners[0], corners[2], 0.5f);