I think I can use gl.glTranslatef(x,y,z) to do that but is there some other/better way in jogl? I mean situations where camera would follow some dude in GTA 1 type of game (viewed from the top).
glu.gluLookat (look into that if 3D)
if making 2d games, you should use wellplaced translate/rotate/scale for camera. I have a “CameraMan” class for controlling the cam in 2d applications if you’d like for me to post it?
Otherwise, the glulookat takes 3 vectors as args.
1 vector describing camera position
1 vector describing a point which we are looking at
1 vector describing which way is up
its easy peasy to use! We used it for some headtracking algorithm in our firstyear project using the wiimote and a sensorbar on your head.
Good luck
Thanks dude!
This glulookat gave me odd results but I didn’t get that second vector is point where we are looking at. I thought it was beginning point so that’s why I couldn’t get it work.
Thanks again