Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

byrdJR

trying to get my game piece to rotate

This topic is 5328 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.


Share this post


Link to post
Share on other sites
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.







Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!