Author Topic: How to setup a camera?  (Read 3958 times)

Offline gpsunjp

  • byte
  • *
  • Posts: 7
    • View Profile
How to setup a camera?
« on: June 16, 2006, 10:13:13 am »
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

Offline Raven

  • int
  • **
  • Posts: 62
    • View Profile
    • http://www.vortex.is/raven
How to setup a camera?
« Reply #1 on: June 16, 2006, 12:06:30 pm »
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

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
How to setup a camera?
« Reply #2 on: June 16, 2006, 02:36:55 pm »
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