Camera pos and hpr lerping to another object

Im curently using hpr and pos lerp to set a cameras position and hpr to an object that moves. I want to move the y value of the camera back but when i do it goes all wacky because the camera is still looking at where the ship is loking so the camera looks like its going to the side of the object when it turns left and right. How can i fix this? heres the section of code

cameraPosLerp = LerpPosInterval(base.camera, .1, (self.ship.getX(), self.ship.getY(), self.ship.getZ()+3))
            cameraPosLerp.start()
            cameraHprLerp = LerpHprInterval(base.camera, .07, self.ship.getHpr())
            cameraHprLerp.start()

any help would be greatly appreciated :smiley:

If you haven’t already, study David’s post here:
panda3d.org/forums/viewtopic … 2961#52961

and ynjh_jo’s post in the same thread:
panda3d.org/forums/viewtopic … 1845#61845

It teaches you many of the basics.