I'm just trying to learn how to implement gluLookAt() in a basic way and I was hoping that this would work for moving my object into the middle of the view from the origin:
But it doesn't... I know this is being called, but the camera's view is not moved to the current position of the object. Anyone able to help me out here with the basics of gluLookAt()?
My understanding was that this would make it so the object was in the middle of the view looking at it from the origin.
Code:
-(void) moveIt {
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
gluLookAt(0.0, 0.0, 0.0, myObject.currentPosition.x, myObject.currentPosition.y, myObject.currentPosition.z, 0.0, 1.0, 0.0);
}
But it doesn't... I know this is being called, but the camera's view is not moved to the current position of the object. Anyone able to help me out here with the basics of gluLookAt()?
My understanding was that this would make it so the object was in the middle of the view looking at it from the origin.