trying to get my game piece to rotate

Started by
3 comments, last by byrdJR 20 years ago
my program is simple tic tac toe, but i want to add some stuff to make it my own. i'm trying to get a game piece to rotate when the user clicks on an area in the board. the code example, tic tac toe, isn't finished and i'm only trying to get the piece to rotate in the upper left corner of the board. see the cube begins to rotate, but then it just turns into an oval type shape. help please! [edited by - ByrdJR on April 13, 2004 1:55:01 AM]
Peace!
Advertisement
more than 17 views and no one here can help me?!

maybe i didn''t explain myself well enough; o.k i''m trying to make the tic tac toe game in openGL. my code isn''t optimized and its about 1000 lines long. so the only areas of the code i need any one of u to focus on is the first if loop in the drawCube function, the rotatePiece function, and I call glutIdleFunction in main.

hope it helps, o this is the link to my code again.
Peace!
seemed ok to me !
The only obvious suggestion was to make sure "choice1" value genuinely equals ''1'' when Draw Cube is called else it won''t rotate.


hmmm, the obvious answer is the following:

if the cube has changed shape from a cube then that can only mean the following:

1. the piece (or intended cube) isn''t being drawn when you think it is (see my last email)- so maybe something else is being drawn

2. something somewhere has been scaled (almost certainly a circular type object) to look like an oval.


I don''t see how there can be any other answers, so I checked your code and found all the push/pop pairs seem to be matched correctly, so unsuspecting scakes seem not to be happening therefore you must be drawing something else there.







i didn''t get your email.

but i have been able to get the cube to rotate, but i can''t get the rest of the cube pieces to stay on the screen. here''s my updated code.

Peace!

This topic is closed to new replies.

Advertisement