bonding objects to each other in opengl while moving

  3d, c++, cylindrical, keyevent, opengl

I can operate the screen going right, left, up, and down. While doing this my glTranslate is -> glTranslate(x,y,z) accordingly changing when I press buttons. However, I want to draw 3d cone top of a cylinder (like a rocket shape). when I do this they are being intertwined. What can I do about this? (I want them to move synchronously when I press the keys)

(p.s.: i set

         gluLookAt(7, 1, -3, //< eye position
         0, 0, 0,  //< aim position
         0, 1, 0);

)

Source: Windows Questions C++

LEAVE A COMMENT