Question about Camera Controls

Hello, let me start of by saying that am noob when it comes to Panda3d and Python.

Anywho i have been trying to write some code where the camera follows the Actor around. I have been able to recreate and modified the camera from Roaming Ralph, so that it will rotate the camera when either the left or right arrow keys are pushed. However, the camera itself doesn’t follow the actor around completely. What am trying to do, is somehow attach the camera to a spot right behind the Actor, so when the Actor moves it follows them, and when the Actor rotates it follows that too. Pretty much am just trying to make an over the shoulder camera.

So i was wondering if anyone could give me any help on this, or know where i can look to find more information out about this. Thank you for your time.

camera.setPos( [some value so it’s behind ralph] )
camera.setHpr( [some other values that it looks into ralph’s direction ] )

at least that would be my first guess :slight_smile:

Thank you so much . You just stopped me from cursing at my computer for 10 hours. :smiley: