Hello!
I’ve been using Panda3D for two days, and I’m really enjoying it. I’m coding a simple game just to try some things, using some models in the Downloads section (ralph and the T-Rex)
Right now I have Ralph running around, something similar to the roamingRalph demo. I wanted a T-Rex to chase him, so I just added a second actor with the T-Rex model and then I tried a lookAt(ralph.getPos()) so it faced Ralph in a move task.
class TRex( DirectObject ):
def __init__( self ):
self.trex = Actor("models/T-Rex/trex",
{"run":"models/T-Rex/trex-run"})
self.trex.reparentTo(render)
self.trex.setPos(0, -80, 0)
self.trex.loop("run")
taskMgr.add(self.move,"moveTaskTRex")
#Controls movement on each frame
def move(self, task):
self.trex.lookAt(ralphObject.ralph.getPos())
return Task.cont
But the T-Rex always faces exactly the opposite direction, as if running away from ralph. I also tried lookAt(ralphObject.ralph). Is it something in the model, like being the head in the negative Y, instead of the tail?
Thanks in advance!