Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - LRFLEW

Pages: 1 [2]
Support / Re: FPS style camera rotation? HELP!
« on: March 14, 2012, 04:48:22 am »
do you have a screen shot? The code in the wiki is fine, it has to be something else.

Ok, here is both the code I used, and a snapshot of a particularly weird point where the triangle suggested a trapezoid shape.  (note that you can see four sides, if only a little of some of them)

AND please tell me the difference is between camera.rotateAxis(camera.getYAxis(), dx / 500f), camera.rotateY(dx / 550f), and camera.rotateCameraY(dx / 500f)

<Note, links have been removed as the files are no longer hosted>

Support / FPS style camera rotation? HELP!
« on: March 13, 2012, 08:44:50 pm »
I'm trying to get started on my first FPS game, and I love that this API exists, as I would never get anywhere without it, but I'm so lost right now with the camera. 

I looked at the wiki (after first trying to figure out the api by itself), and have tried the code there for the fps camera, but that doesn't seem to work right.  I'm testing this by placing a triangle in front of the camera and using a MouseMotionListener to track the mouse movements and a Robot to prevent the cursor from running away (although it's not a perfect setup, but I'll deal with that later).  The problem is the code on the wiki makes no sense, and the outcome makes about as much sense as the code itself.  The triangle seems to warp and distort around as I look.  I can even get the triangle to appear rectangular, which befuddles me.  If there's an object behind me, no amount of looking around seems to find it. 

Also the code itself makes little sense in what functions are used.  Why does the yaw change with camera.rotateAxis() and the pitch with camera.rotateX()?  Why not camera.rotateY()? and why not camera.rotateCameraX() and camera.rotateCameraY()?!?

I need some clarification as to what's going on here and how I should fix it.  Any help is appreciated.

EDIT: Ok, after another look at the code, I realized that the thing I said about not being able to see something behind me was just a problem with the counter clockwise-ness of the vertices, but I am definitely getting a single triangle to have four sides, which totally and completely befuddles me.

Pages: 1 [2]