Dynamic component axis using animate on click function


I’m using the on click function with dynamic components, just a simple click with rotation along the red axis from 0 to 90 degrees, pretty simple and I have my head around this, however, I have a series of lets say sides all vertical on an 8 sided shape, I would like all of these to fold out to a basic horizontal position with one click, I also have a good idea how to perform this function but for some reason all of the side that are on a 45 degree will not rotate along the red axis, they just re-set every time and move off of their own individual axis and rotate based on the overall models axis, I can’t get then to stick no matter what I do.
I must be doing something wrong, can anyone advise?
Thank you

it is simpler (easier to understand) to place rotations at different levels otherwise got to fix or add formula to the other rotations (they act like pitch, roll and yaw and will change or become zero if not initialized)

oct doors.skp (291.2 KB)

the copy door requires fixed dimensions as well

Hey pcmoor,
I can’t thank you enough for this, it’s exactly what I was trying to achieve. I’ll study exactly what you have done within the attributes so I can fully understand, but thank you again, amazing!