(which should work, but it crashes panda)
Don’t work! I tried intervals, tasks, just everything I could, but IT JUST DOES NOT WORK.(When I was writing this I almost shouted this into that ahem… monitor)
The problem with a “while True” (or while 1=1) loop is that this doesn’t allow Panda to keep rendering the frame, resulting that the application hangs.
So, the solution to this is to put it in a task:
that’s not a bug in panda. that’s a bug in your code. so, no we cant add it, its not even a bug after all.
the manual already explains it quite well.
it’s up to you to make sure you are not locking yourself into your own while-loop (which prevents the panda-main-loop from executing).
That’s not a bug.
You must think that Panda works on a 4 dimension base: the flowing of time (igloop task, that is) is essential to define the state and positions of objects and everything else.
Putting a never-ending loop denies the flowing of time because doesn’t allow the igloop to get to the next frame, it creates an eternal still moment.
I think Dany wants to execute that function immediately without waiting for the first second to pass by, and then repeat.
Just replace that “1” with the return value of the doMethodLater().
so if you put an infinite loop into your code, you never reach update_the_panda_window(), which means, everything gets repositioned, rotated and changed into infinity, but never rendered.
sorta yes. but the rendering will be done automatically.
if you set up a task, the task will be executed once per frame.then renders, then executes the task one, then renders once etc. what you do inside your task is up to you (for example moving the camera around)
or there is the taskMgr.step() function which you can call from your loop that will update the window and everything. It simply needs to be called once per loop or every couple of loops.