Best way to automatically scale object width, but NOT height? AE
Copy link to clipboard
Copied
Hello! Thanks in advance for any help..
I'm making a 'special' bar (Tony Hawk Pro Skater style) and want the slider I've made to decrease over time.
In order to achieve this though I need the slider bar (orange and yellow rectangle shapes, grouped) to only decrease in width, and not decrease the height also - which, using the pickwhip in the way I've done it, is unfortunately happening.
The method I've used to attach the small yellow rectangle (end of the slider) to the slider rectangle itself is by drawing a path with the pen tool (invisible), and using trace path to follow that path up and down the bar. I've then pickwhipped the rectangles (small end one and big ones in group) to the progress bar of the trace path to get the left-to-right progress effect.
Do I need to change the way I've done it? Or does anyone have any ideas for keeping the method I've used, but prevent the rectangle from shrinking vertically? Might I need an expression? One other way I thought of doing it is using a mask, and moving the rectangle positions with keyframes, but I do like the percentage effect that the trace path allows... So would prefer to keep that function if possible.
Very grateful for any tips / help!
Copy link to clipboard
Copied
There are no expressions required. Start by actually drilling into the properties of the bars and unlinking the X and Y scale parameters instead of linking the whole group transform. or if you do, you actually organize and nest the groups properly to get correct behavior. I would strongly recommend you actually read the online help on this stuff. Other than that you can always use a linear wipe to reveal the bars, use conventional solids with adjusted anchor points and any number of combinations of other techniques. Not everything needs to be a shape layer and despite their power they aren't even the best solution. I'm also prettyy sure you can find tons of "progress bar" tutorials" out there. Just don't try to do everything in one step on a single layer with as few elements as possible - that's a very typical beginner mistake, no offense.
Mylenium
Copy link to clipboard
Copied
To keep the set up as is, expand the Rectangle shapes until you can see both their paths.
Then as Mylenium explained, click on the infinity symbols to unlink the X and Y sizes.
Once done, you can keyframe the size values, altering the X only.
This will cause the bar to shrink into its centre. If you don't want that, you'll need to keyframe its own Anchor property
If you want to make life easier for yourself, you can use the pickwhip on the second rectangle's size to link it to the first one:
Copy link to clipboard
Copied
Thanks for the response.
One thing that was part of my confusion earlier was, I had unlinked the x / y scale (using infinity symbol / chain link button you pointed out) already, but when I then pickwhipped the scale to the trace path it disregarded that and still shrank both axis. I did have to move the anchor point to the left which solved the scaling from one side only (right to left) but just couldn't get it to behave once pickwhipped to the path.
I think I may have to do it again quickly, a little tidier, and possibly use a mask and keyframe the bar's position rather than this way. Or if not, I did think (rookie mistake) just now that I could merge path the shapes together at the beginning, so that the yellow vertical rectangle on the tip of the bar isn't a separate moving shape to the main bar - they would be attached.
Thanks for your help! I'll keep fiddling..

