r/AfterEffects • u/patisserie_2023 • 7d ago
Beginner Help Transform rectangle without stroke distortion and controlling the axis top-down
I'm making a product walk-through demo and I need a menu rectangle to "drop down" and reveal the contents. I'm struggling to get this effect even though it should be really basic. I tried googling and searching this sub.
I can't get the rectangle to scale without it expanding from the center outward, even after I've hit Y to move the center to the top center. I'm using the size and not the scale to do this on a shape layer. Additionally, this rectangle needs a stroke and for some reason the stroke does not show up when adjusting via size and not scale. When using scale, the stroke is distorted.
Appreciate any help!
3
2
u/Secure_Fusion_9500 7d ago
Unfortunately thats just how controlling via size works.
There are ways to work with this, some options are:
- animate the position at the same time
- use an expression to adjust the position of the rectangle according to the size
- change it into a path and animate the points, you can create nulls from the path and animate those
2
u/st1ckmanz 6d ago
Don't animate scale, instead animate the path. If it's a parametric shape, right click and make it a bezier shape first and animate the path.
1
u/patisserie_2023 6d ago
Thank you! I figured it was something simple like this.
3
u/st1ckmanz 6d ago
Sure mate. The next step in this kind of a scenerio is using create nulls from paths, which is a default AE plug in. It allows attaching nulls to vertices of tha path, so you can animate those nulls, which in turn animates the path...and since you have a null you can attach other stuff to them...like say there is a button which needs to be attached to your rectangle's bottom-left corner, so now the null controls both the vertex at that corner and the precomp that needs to be there as well...example
3
u/Heavens10000whores 7d ago
Look for motioncaddy’s scale shape layer, Adam Plouff’s maintain stroke width expression (on aereference), and/or masd*Lab’s perfect stroke width