Camera Chasing Issue

So I set up the camera to follow an Actor…

def CameraFollow(self,task):,y,z)

Initially the camera is between the panda’s legs, below the belly, so in trying to figure out the coordinate system I wrote some script to adjust the camera’s individual x, y, and z coords with hotkeys and display their values on the screen.

To my surprise i found that I had to back the camera out to 1300 units on the Y axis just to see most of it’s face. Also, there is empty grey space that seems to cover most of the models when I zoom out that far, which I can only assume is the draw distance cutoff for zooming out so far.

The scene & model is the basic panda walking sequence that comes with the download. One of the samples that comes with panda3d is the shadow effect example that also has a camera chasing the panda, but after viewing the code I found the camera’s position wasn’t set any farther then 10 units away on any single axis, so obviously something is going wrong.

Any ideas? thanks.

The distance cutoff you’re seeing is probably the far clip of the camera lens. You can adjust that easily: … ld_of_View

Or, you can just scale your model down a lot.

Yea I ended up adjusting the base.camLens.setFov() so that now the grey disappears. The scaling still seems to be off though.

Everything else seems to move quite significantly however when I adjust it’s position by even 1 unit, and the camera chasing the actor still has to be moved over 1000 units to make a difference. The panda’s scale is .005 on every axis.

Just doesn’t seem to make sense that the camera would have a different xyz unit scale then the rest of the objects in the scene.

Hmm, I rather meant the Far clip (setFar) of the camera, rather than the field of view.

err… I ment to say base.camLense.setNearFar

Nothing inherently special about the camera node; it inherits its scale from its parent, just like any other node. If it’s got a crazy scale on it, it must have come from somewhere.