Hybrid View

Simple animation issue--but I can't see it

Hello! I have been staring at this for hours and have played around with all of the logic and numbers and nothing seems to do what I want. I am trying to create an animation that shows how a shape or object is actually rotated in openGL... so I create an object at a particular point in space, I need to animate it moving to the origin, rotating, and then translating back. So I have been able to get the shape to move around, but once it hit the x = 0 point, instead of changing directions, it stays in a jittering mode, like the direction is continuously getting changed...but I can't seem to understand where my code is doing this. I have pretty much commented everything out so I know where the culprit is but I have no idea where I am going wrong :-( Can anyone please help? I am doing this in baby steps, so as soon as I get the x-direction working I'll start adding in the y and z directions as well as the rotation at the origin...

Thanks!! I have taken out all of the commented code that is not in use yet for legibility...I don't think any of it is relevant to my problem...