Hi guys, I’m starting a small project on my own where I’ll be editing roaming ralph in a few different ways. I have a very small amount of knowledge of panda3d, but more significant knowledge of python 2.7. I’m going to try and do most of it on my own with little help from the forums, but I have run into what I hope is a very simple logical problem. I’ve changed the way the camera works (for better or worse), and I’ve run into a little problem. I’ve taken out all of the code that affects the camera, and have replaced it with this.
base.camera.setPos(self.ralph, 0, 10, 10) base.camera.lookAt(self.ralph)
pretty simple, but this gives the result of placing the camera behind ralph, looking down at the back of his head. The camera follows ralph, and stays behind him like i’d like, but I’m trying to angle the camera upwards. When I use this:
or any variation of setHpr, it just makes the camera look directly behind him. Any ideas on what I’m doing wrong? Or is there a better way to get the camera to stay above and behind ralph, while staying with him, and always looking forward with him?
Also, eventually i’m going to try and add weapons/targetting system to this, so if you can think of a way to fix this, that won’t cause problems later with camera movement, that’s a bonus, but really i’m such a beginner it probably will be a while till I’m at that point. Thanks in advance.