How can I animate the trigger and hammer of a gun?

Right now I have a pistol model with child objects of a magazine, hammer, slide, and trigger. I am in the process of animating the gun for when it shoots. The slide animation was easy, just moving it along the z axis. The magazine should be simple enough, just change y position. I am stuck on how to animate the trigger and hammer however. I want the trigger to be anchored at one point inside the gun model and rotate around that point, and I think the same effect should be applied with the hammer. How am I able to do this?

Create some empty game objects at the pivot point locations you want the objects to rotate around. Parent the objects you want to animate to the empty game objects. Parent the empty game objects to the master parent of the weapon, the housing or other master parent object. Then animate the empty game objects as you want, and the hammer and trigger will ‘follow’ the animations you create.