I have a sprite that is inside a triangular like shape. How to make the sprite decrease in size as it moves down the shape?
If I remember sprites in Unity have a variable local scale.
You just have to apply the intercept theorem on the scale.
(oldScale.y/oldDistanceToPivotpoint) = (newScale.y/newDistanceToPivotpoint)
Same works for scale.x.
You can do this every frame.
Your distanceToPivotpoint is simply the distance from the center of your sprite to the lower corner of your triangle.
One technique that you could try is the following: When you move the sprite downwards within the triangle, you could decrement the sprites lower width, then it's upper width, gradually; ultimately creating that sucking in effect of the sprite moving through that shape.