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.


Topics - gabriel_mb1

Pages: [1]
1
Bugs / Camera.CAMERA_MOVEUP, Camera.CAMERA_MOVEDOWN - bug?
« on: December 31, 2006, 01:42:55 am »
Hi Egon, I'm new here and playing around Java and jPCT for a few weeks.

I was playing with the camera and found something like a bug or
at least a different behavior on the Camera.CAMERA_MOVERIGHT, Camera.CAMERA_MOVELEFT X
Camera.CAMERA_MOVEUP, Camera.CAMERA_MOVEDOWN


I used this code to rotate the camera around the center of the World:

Code: [Select]

                if (rotleft) {
                    theWorld.getCamera().moveCamera(Camera.CAMERA_MOVERIGHT, zoomSpeed);
                    theWorld.getCamera().lookAt(SimpleVector.ORIGIN);
                }
                if (rotright) {
                    theWorld.getCamera().moveCamera(Camera.CAMERA_MOVELEFT, zoomSpeed);
                    theWorld.getCamera().lookAt(SimpleVector.ORIGIN);
                }
                if (rotup) {
                    theWorld.getCamera().moveCamera(Camera.CAMERA_MOVEUP, zoomSpeed);
                    theWorld.getCamera().lookAt(SimpleVector.ORIGIN);
                }
                if (rotdown) {
                    theWorld.getCamera().moveCamera(Camera.CAMERA_MOVEDOWN, zoomSpeed);
                    theWorld.getCamera().lookAt(SimpleVector.ORIGIN);
                }

It's not a beautiful code but I'm still learning how the engine works.

and what I got is that when I rotate right or left, it's ok, but
when I rotate up or down, there is a jump when the camera is crossing the Y axis. (Or the XY plane of the world)

Seems that the code behavior of MOVEUP, MOVEDOWN is different from MOVELEFT and MOVERIGHT.

Congratulations for your engine, it looks fantastic!

Thanks, and Happy hollidays!

Gabriel

Pages: [1]