animating a Rubiks cube

(Gonazar) #1

Hi all,

I’m having some trouble figuring this out. I’m trying animate a model rubiks cube, since I’m such a noob still, i can’t make an set of objects (3x3 cubes) rotate in a circle. instead they take shortcuts, so combined the set looks like they shrink while spinning then expand again. I’m not too sure whether i should use some sort of array of curves to do the translations or some thing else, i can’t use parents, for reasons read below, unless they are temporary parents somehow. This is my primary problem, i was actually hoping to make a game out of this. But i’m not actually sure how to program cubes to move in a fashion then again in a different orientation.
For example, i have a single cube part of the whole rubiks. It rotates around a center piece on the x axis, then it has to rotate on a different axis around a different center piece.
After some attempts, I don’t think parenting any cubes works because the pairing of objects changes constantly.
I figure after i have this figured out i should be able to assign key or mouse functions to do different moves etc. right?

Oh well, I appreciate any help, thanks!

Sorry i forgot to post my model, here it is, i made it with each individual piece a separate object, i’m not sure if thats the best way to do it, but it seemed logical at the time.


(fatfinger) #2

Have you tried using the rotate gizmo, or constraining the rotation to one plane ? It worked for me. Click on the little hand, at the bottom of the 3D view to turn on the gizmo

There is a working model of a Rubik’s cube floating around somewhere. It was rigged with bones that were connected in the middle. I can’t find it a.t.m. A Google search should turn it up


(Lord of the Rings Junkie) #3

I don’t know how it was done, but it is possible. I know because someone has made a Rubik’s cube game, I just need to find it…


(ititrx) #4

I have the rigged cube, but it is not animated… do a search here for rubiks cube, there should be many links to it…


(Gonazar) #5

Ah i see now how to rig it, any clues on how i may go about making it into a game?


(IamInnocent) #6

I have here a Rubik’s cube which is one single object and which is rigged with 3 armatures, one for each axes, and 3 bones at each armature, one for each rotation plane. I use envelopes only of course and a constraint for each bone to a rotation around their local Y axis.
It is not perfect because I left a little bit of space, 10% for the moment, between each sub-cube. Even then shaping the envelopes really took some work, both in EditMode and in ObjectMode. I started with a single armature of just one bone, shaped the envelope so it would influence just one plane of rotation then copied that bone to build a first complete armature and that armature to have three, one along each axis.
It works fine but to be true to the model there shouldn’t be any noticeable gap between sub-cubes… I doubt that I could shape the envelopes so finely to succeed in that case (not that I won’t try :wink: ).
Otherwise I can only think of adding hooks and vertex parenting to the equation: there has to be a simpler solution than that!
I’ll do a search first.

Here’s the thread where Gabio’s solution can be found:



(Gonazar) #7

What I have now is Gabio’s solution which is every box in the cube is attached to an armature which originates out of the center. I ended up just using vertex groups to set my armatures after spending an hour trying to get it to set itself up, which just doesn’t work. Anyways, it works now fine, but i’m still trying to figure out how to make controllers for a game.

Thanks for the help!