Ok this is more of a Python problem than a Panda problem but I hope I can get some help.
I want to make some kind of main loop usually in C++ you could use
But we aint in Cansas anymore and I really don’t know how to use Python, how can I do this?
in python you would usually do:
but panda doesnt seem to like while loops, so you’ll have to setup a task ie:
# this task makes the camera follow the player in 3rd person view
speed = 6.0 # ft/s
offset = Vec3(0,15,7)
dt = globalClock.getDt()
currPos = camera.getPos()
desiredPos = self.player.getPos()+self.player.getQuat().xform(offset)
direction = Vec3(desiredPos-currPos)
# return Task.cont if you want the task to keep running
# if it should only run once, dont return it.
You can find more (and better) info on tasks in the manual.
Ahh that makes sense now I had done a task example from the documentation but it didn’t sink in.
Thanks for your prompt response.