The Stretch modifier simulates the traditional animation effect of “squash-and-stretch.” Stretch applies a scale effect along a specified stretch axis and an opposite scale along the two remaining minor axes. The amount of opposite scaling on the minor axes varies, based on distance from the center of the scale effect. The maximum amount of scaling occurs at the center and falls off toward the ends.
Stretch Param description
Amount
Sets the base scale factor for all three axes. The scale factor derived from the Stretch value varies according to the sign of the value.
- Positive stretch values define a scale factor equal to Stretch+1. For example, a stretch value of 1.5 yields a scale factor of 1.5+1=2.5, or 250 percent.
- Negative stretch values define a scale factor equal to -1/(Stretch-1). For example, a stretch value of -1.5 yields a scale factor of -1/(-1.5-1)=0.4, or 40 percent.
- The calculated scale factor is applied to the selected stretch axis and the inverse scale is applied to the minor axes.
Amplify
Changes the scale factor applied to the minor axes. Amplify generates a multiplier using the same technique as stretch. The multiplier is then applied to the Stretch value before the scale factor for the minor axes is calculated. Amplify values affect scaling along the minor axes in the following way:
- A value of 0 has no effect. It uses the default scale factor calculated from the Stretch amount.
- Positive values exaggerate the effect.
- Negative values reduce the effect.
Axis
Axis to stretch along.
Do Region
Constrain the effect to a region.
From
Start of the region.
To
End of the region.
Stretch Class
{
public float amount;
public bool doRegion;
public float to;
public float from;
public float amplify;
public MegaAxis axis;
}
Stretch Tutorial
You must be logged in to post a comment.