Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Rolling Block


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 Vincent_M   Members   -  Reputation: 709

Like
0Likes
Like

Posted 19 April 2013 - 03:24 AM

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.



Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS