Ok, im a noob having fun experimenting with opengl for the first time over the past week or so. I’ve run into an issue with rotating shapes I cant seem to get around.
I’ve drawn a simple shape and want to rotate it around itself (i.e i want its ‘pivot point’ centered on the shape, in 3d program speak). When rotating my shape with,
float angle = 30;
the shape flys around the screen in the x (instead of on the spot), and with a small function i created to +=10 to angle the shape eventually flys back to its original position and begins its journey again.
I followed some tute that said I have to use glTranslate to move to the point I wanted to rotate from, so I moved to the center of my object with
before drawing but this made little difference and my shape still rotates around this ‘invisible’ point ?
I know im missing something, probably small any help ?