- Home /
 
               Question by 
               culkinnivas · Jun 15, 2017 at 10:01 AM · 
                script.scaledistancescrollview  
              
 
              How to scale a object with distance from the center of the canvas?
i need to achieve a treadmill effect for the scroll view, i.e while scrolling the center object need to reduce in scale when moving away from center and vice versa? can someone point me in the right direction, im already calculating the center of the scrollview from the elements to achieve the snapping effect.
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by IgorAherne · Jun 15, 2017 at 11:40 AM
get distance in pixels from another rect transform and divide it by your maxDistance. Use this coefficient to scale down your rectTransform
Your answer
 
 
             Follow this Question
Related Questions
Scale mesh between two Vectors 1 Answer
How to Scaling object with new UI slider ? 1 Answer
spawned object wont change scale? 1 Answer
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                