make camera reparent to object?

Hey, is it possible to make my camera reparent to my character so that it automatically follows?

Yeah.

base.camera.reparentTo(character)

You can then setPos on the camera to give it an offset, then you can use base.camera.lookAt(character) to make it point at the character.

thanks a lot

I’ve done this before, and I like to set the relative position of the camera a bit behind and above the player, looking out. For example (using ralph):

base.camera.reparentTo(self.ralph)
base.camera.setPos(0, 30, 10)
base.camera.lookAt(self.ralph)
base.camera.setP(base.camera.getP() + 15)

I would play around with it, until you find something you like. Also, remember to call base.disableMouse().