How to setup a camera?

Started by gpsunjp, June 16, 2006, 10:13:13 AM

Previous topic - Next topic

gpsunjp

Hello

I have a Object with size (800, 1000, 400), and center(200, 400, 500).
How to setup a camera so that the whole object can be displayed?
In my case, It seems that some parts are culled by near and far plane.

Thank You
Sun

Raven

Well... depends, do you want to be able to see the object from multiple perspectives?

I recommend you check out the movement in the jPCT demo files, they should provide you with a sufficient starting point for moving the camera (e.g. use the FPS demo camera controls and turn the gravity off).

If, however, the problem is only that parts of your object seem to be missing, you can set misc. culling params (farplane, maxpolysvisible, etc..) in the Config class. Check out the jPCT javadocs.

-Raven

Melssj5

Well, of course that the camera position depends on the angle you want to see the object, in anyway, I move the camera until I got a desired view and took notes about the position to set it on the code. As your object is big I guess that the problem is that part of the object is not being rendered. To fix that just adjust the Config.maxPolysVisible before calling to the world constructor.
Nada por ahora