What’s the best method to query time and determine frame-rate independent animations? I’m not terribly familiar with Python.
My favorite method is to build a timed task, that is, a task that only executes itself at certain time frames. For example a task that executes every 0.1 secs or if a certain condition was met.
You can query how much time has passed since a task has been activated with ‘task.time’.
You can also query globalClock.getFrameTime() at any point to get Panda’s idea of what time it is, to a fairly high precision. This is an elapsed time in seconds from an undefined epoch.
Once you have the elapsed time since the last frame, you can move an object with the verlet integration as described in this post :
discourse.panda3d.org/viewtopic … 2350#12350