Few quick questions

I’ve got what I can call the beginnings of the 3D game in this java binding of OpenGL LWJGL. I’ve made a simple scene with a few items in it, one of which is the character. How it works now is that the camera is static and stays in the same place while I press keys, which changes the character’s x and z coordinates and then re-renders the screen. I’m not really sure how I’d go about making the camera move with the actor. If I’m completely going down the wrong path I’d appreciate any help or guidance you could offer.

EDIT: also, do you also know how to stop thing beyond a certain perimeter from rendering. I know it’s done through a clipping volume. Have I already done this? :x Because it doesn’t seem to stop after the cut off point.

Thanks in advance!

I’ve included the source just so you can see what I’ve done so far. :stuck_out_tongue:

: also, do you also know how to stop thing beyond a certain perimeter from rendering. I know it’s done through a clipping volume. Have I already done this? :x Because it doesn’t seem to stop after the cut off point.

Try enabling glScissorTest. Might be what you need.

I’ll have a read up on that function, thanks! Do you know how I can move the camera? Also, whether I should be. :stuck_out_tongue:

By building a modelview matrix. Google the functionality of gluLookat and build some matricies like that function.

I’ve heard about gluLookAt and forgive me for my ignorance, but would I be able to achieve the same or similar effects by manipulating the scene using glRotate, glTranslate, etc?