Jump to content
  • Advertisement

Archived

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

Clydelo

Rolling ball effect

This topic is 5794 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

Hi .. I''m using VC++ 6 and OpenGL to create a biliard game.. While the ball is moving on the table, How do I make the ball appears to be rolling? THx

Share this post


Link to post
Share on other sites
Advertisement
Well, the x, y and z values of the centre of the ball should be known by you. Just rotate the ball around that centre with the glRotatef command. Make sure you rotate around the origin, else the ball won''t only rotate, but also move...

I expect you won''t see the rotating happen if you don''t have a texture mapped ball (if there''s only color and no lighting you cannot see a difference between the top and bottom of the ball)

so make sure you can see if it actually works

Share this post


Link to post
Share on other sites
Thx subotron,

However got a little problem..While trying to texture map the spherical balls.. I''m using glusphere command and while I''m rotating the camera round, the texture seems to always face the camera.

For example, if I texture map the number 8 on a ball, the number 8 always faces the camera even.

How can I solve this problem?

Share this post


Link to post
Share on other sites
Thx ,

However got a little problem..While trying to texture map the spherical balls.. I''m using glusphere command and while I''m rotating the camera round, the texture seems to always face the camera.

For example, if I texture map the number 8 on a ball, the number 8 always faces the camera even.

How can I solve this problem?

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!