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(, .1, (self.ship.getX(), self.ship.getY(), self.ship.getZ()+3))
            cameraHprLerp = LerpHprInterval(, .07, self.ship.getHpr())

any help would be greatly appreciated :smiley:

If you haven’t already, study David’s post here: … 2961#52961

and ynjh_jo’s post in the same thread: … 1845#61845

It teaches you many of the basics.