How to rotate static mesh around a custom axis in space?

I have a model that has a series of separate parts. I collected all the static meshes into one blueprint class. When I imported the models from blender they meshes were already offset and rotated to fit together so once imported I did not have to move the meshes around. They all have their origin in 0,0,0.

Now, many of these parts are attached by hinges and I want to every tick update the rotation around these hinges based on some input. Imagine animating a trigger on a gun being pulled or the reload bar being pulled. Please have a look:

http://puu.sh/pJ1k6/351f6116d5.png

These examples show a circular mesh rotating around a central axis and a hatch rotating around an axis at the end where it is attached. None of these axes are at 0,0,0 and they all have to follow the orientation and translation of the actor of which it is a part.

I have no idea how to do this. I can set local rotation and local location, but that is in regards to 0, 0, 0 of the actor. I have looked into skeletal meshes, but that seems to be for more advanced animation.

If you could explain how this is done, please let me know.

EDIT:
I could do it by putting a lot of invisible location markers and use those to rotate around or between.

I finally managed to get it to work. It is easy once you know what you have to do.

First, make all the static meshes and rotate and translate them such that the location where you wish to attach that mesh is at origin. In other words, if you have a long mesh that should attach to something by the tip, then make the origin of the cane mesh at that tip.

Then, after importing the meshes you have mesh A and mesh B. Mesh A is the main mesh and mesh B attaches to mesh A. If so, open mesh A and add a socket and move that socket to the location that mesh B should attach to. For every parent-child relationship you need to add one socket to the parent mesh. TIP: Use a mesh as guidance by selecting a static mesh in the Guidance Static Mesh option.

Then make a blueprint containing all the meshes and build the hierarchy as you want. Then for every child mesh find an option named Parent Socket and select the correct socket. The new mesh should snap to where the socket is placed.

After you are done you can now rotate and translate around the point in space the socket represents. Restrict rotation or translation as you normally would. If the rotation looks weird you might have to double check the origin of the child mesh that you are rotating.

I hope this helps someone as I was stuck on this for a bit. I tried using sockets, but the result was entirely not what I wanted so I thought I was doing it wrong. However, sockets are amazing for just this.

Source and further reading