Beginner to After Effects here. I'm trying to do a basic transition: text starts out at 50% of its size, centered to the composition. After a few seconds I want the text to increase to 150% while staying in the center. But anytime I do this the text shifts. Can anyone help?
Although you can reposition the anchor point with the Pan Behind tool (Y),
an easier way to center it is in the menu.
Layer->Transform->Center Anchor Point in Layer Content.
I agree with the other posts here: It's important to set the correct alignment and placing of a layer before you keyframe anything.
In addition to rbd-dc's answer, you can centre your text in the composition by going to the 'Align' menu and pressing both the horizontal and vertical alignment buttons.
Note, too, that the anchor point for text never starts in the middle. Press [Y] to edit the anchor point (Pan Behind), select the text object and you can move the anchor point yourself so that it's in the centre of the text (it should snap to the middle).
Please bear in mind, though, that you'll need to do ALL of this before you start dropping in your scale keyframes, otherwise you'll notice that the word starts moving all over the place (you can amend things with already active keyframes but it's a bit of a faff so it's always a good idea to get your objects and anchor points set up where you want them before you begin animating).
NB: You'll notice that, in my images, I've messed up a bit - I centred the anchor point AFTER aligning the text, so I had to align it again. The numbers listed here are the correct way to do this. Technically, you don't need to centre the anchor point first but I find it's easier to control when you're wanting to keep things central. Skip this step if you don't need it.
After you create your text, go to the 'Paragraph' panel and make sure the centered icon selected, you should then see that the anchor point shows up in the middle of the text. Then look at the x position of your text to make sure it's in the center of the comp (if its 1080p, that would be 960) Here's a screenshot that may help: