Rubik's cube array rotation
Posted
by
Ace
on Game Development
See other posts from Game Development
or by Ace
Published on 2013-06-27T13:14:58Z
Indexed on
2013/06/27
16:29 UTC
Read the original article
Hit count: 335
I'm about to make a 3D Rubik's cube based game in Flash AS3 and Away3d.
I don't really know how to manage the 2D arrays of the Rubik's cube.
For example, how do I rotate the corresponding arrays if I rotate a side, or just rotate a middle part?
In this stage I also don't know how to rotate those smaller cube parts all together if a side is rotating. First I was thinking of "groups" ( like in sketchup or 3ds max, blender), but that would be tricky, because the group components would change every time.
So I was thinking of just rotating each individual piece along a global axis. However, I just know the Away3d functions to rotate the cube of his local X , Y or Z axis, but how to rotate in global axis?
Does anyone know of a algorithm for doing these types of rotations?
© Game Development or respective owner