Author Topic: Center Item gets bigger  (Read 1212 times)

amirivala

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 17
    • View Profile
Center Item gets bigger
« on: October 28, 2014, 01:17:48 PM »
Hi,
Im New to coding I'm making a UI with scroll view, and using a center items to makes my buttons center on the screen, what i wanted to do and i don't know how to make it work,
I want Center Button is getting bigger and other buttons gets smaller as they leaving the center, and i wanted it to be live.
Please help me, i have a deadline to reach.
Thank you So Much
really appreciate it

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Center Item gets bigger
« Reply #1 on: October 29, 2014, 05:16:26 AM »
You can figure out what the "center" is using math. Easiest thing to do is to probably just create a game object in the center of your scroll view, then check the distance between that object's position and each of your item's positions. Choose the one with the smallest distance.