We have a 2002 Toyota Corolla. If you put up the car in the air, the shafts in front of the transmission rock back and forth. Why? Also, I keep hearing the noise when I'm driving.
The first thing you’d want to do is check the transmission and motor mounts. They all work together. Your vehicle is 14 years old and odds are that the mounts are worn. That’s a common thing that happens with your vehicle. The mounts are just going to wear over time and you need new mounts.
I’ve got a video "Changing Broken Motor Mounts" that shows how you can jack it up with a little piece of wood under the oil pan and then you can see if they are worn. If they are worn, it’s time to replace the mounts. They will wear out over time. I’d recommend having a certified mechanic like one from YourMechanic to check your motor mounts and pinpoint the source of the noise that’s coming from your car.