Rotation around a joint

Hello community,

how would i rotate an entity around a given joint of a parent entity?
E.g. I’ve got a 2D entity which represents a game character and a has child entites for each bone (body, head; i want to create a custom 2D animation system). How would I rotate the head around the top of the body? I already tried to set the center of the bone texture, but that didn’t seem to have any effect at all.

It should look something like this:

Greets

Andi