Rolling Block

Started by
-1 comments, last by Vincent_M 11 years ago

I have a block that's 1x2x1 units (x, y, z), and I'd like to roll it around a grid as shown in Cubicman:

My box is going to be decorated, and the programming for it is just a mess, and about half way completed. What I'm doing right now is keeping track of which of the six possible directions the box currently is facing UP (standing tall), DOWN (upside-down), LEFT (facing negative x-axis), RIGHT (facing position x-axis), FORWARD (facing negative z-axis), or BACK (facing positive z-axis).

-If UP, I figure out if it's going LEFT, RIGHT, FORWARD, or BACK, then animate

-If DOWN, I figure out if it's going LEFT, RIGHT, FORWARD, or BACK

-If LEFT, rotate left, rotate right, etc etc...

I'm pretty confused up to this point. Does anyone have any other ideas on how this could be done? I'm sure there's a simple solution, but I think my matrix transformation system needs some work.

This topic is closed to new replies.

Advertisement