Sign in to follow this  

rotate or translate is the q

Recommended Posts

hi everyone, this i know, to draw an object in ogl you translate, then rotate it. good if you want to move an object on 1 of the axis of the object, you rotate, then translate (is this correct?) im trying make an app to visualize how to make "cut-outs" on paper (like we did when we were A LOT younger) so if i have a grid ( x and z axis) and a few point on it, to make a triangle move along the lines, you would.. drawgrid loop (for all triangles) glpushmatrix glrotate (triangle in the right direction, usig atan2) gltranslate (the triangles front point, increase z axis) draw traingle glpopmatrix this does not work. either it rotates around middle an outwards, or move in right direction til new point is reached then goes bezerk. so simple task, but so annoying!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this