I still haven't gotten the per-block lighting worked out. I'm trying to do a back-lit object like portal uses for their level screens (http://www.instructables.com/image/FIE8HZKGWTIJT0J/Portal-Level-Sign-Wall-HangingLamp.jpg), but instead, the blocks avoid using the light :-/, while the spool hubs are flooded with the light. Currently, this is not at the top of my priority (weird of why I set it so high on my previous list).
What is my current priority is the reel class. Yes, I said it was finished...but that doesn't mean its bug free. The structure and and the assumed actions are completed. After getting that z-glitched figured out (and enabled actual testing of the reel class), I got a new.....problem. lol. I am unsure of how it happened. It works half-ish both ways....I'll just post the pictures then explain.
When the game starts, the spools look like this (damn lighting, lights the wrong objects). The rightmost spool (spool 0) is in its correct spot, spool 1 is also in its correct spot, its blocks however are not.
After touching the screen to rotate the spool (works correctly by the way, spins both blocks and spool hub on spool 1), the objects of spool 1 all shift rightward.
The reason I say "I am unsure of how it happened.", is because the spin code doesn't do anything to the spool's translation.
public void Spin(float val)
{
Hub.reset();// resets rotation only
Hub.rotateZ(30 * totalRot);
Hub.rotateZ(val);
Hub.rotateY(110);
}
Looks like I got another interesting problem ahead of me. Luckily, I can easily apply all of this knowledge to the gameplay part of the game (whenever I get to that point).
No comments:
Post a Comment