Jump to content
  • Advertisement

Archived

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

Body Thief

Newbie cylinder problem

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

Ok.. i know this is a newbie question... How do you orient a cylinder between two points.. I have tried to do so using rotations. but there seems to be an offset or some degree of error.. Please.. if someone can help I'd be greatly appreciative.. Thanks BT email : dante_ix@yahoo.com Edited by - Body Thief on August 6, 2001 3:23:26 PM

Share this post


Link to post
Share on other sites
Advertisement
Well...

Create a vector by subtracting point B by point A. This vector will be one of your cylinders axex in it''s matrix. Then To make the other two, you need to decide on how you want the cylinder to ''roll''. Finally, Find the center of the cylinder should be at the average of points A and B.

Once you have the cylinders transformation matrix, multiply it by openGLs modelview matrix, and draw your cylinder.

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!