Panda Bullet

Hi ennOx
thanks for your answer, I’ll try to dig a bit more on the subject asap.

It’s indeed difficult to trim down the problem since the issue seems related to the duration of cyclic threads execution.

Anyway as of yesterday night, my best explanation is the following:

Consider 3 task_chains to be ran in thread mode:

> task_chain_1 (t1) (master task_chain) takes care of regular stuff +
  is in charge of getting actor animation. So t1 is the task that activates
  the kinematic nodes (in this case the hands and feet of the actor)
> task_chain_2 (t2) encompasses all audio/video processing
> task_chain_3 (t3) manages bullet_sim (doPhysics) and Ctraverser collision (pusher...)

Now what happens is that t1 appears to be running roughly every 0.01s, t3 roughly every 0.2s (as per my reported
spy result of [Questions on proper use of panda task-chain threading) )

When activated t3 will then exercise mgr->do_physics with the appropriate dt (ie roughly 0.2s) to advance bullet sim.

So this seems to explain that the catch up of t3 with t1 (which drives the display) only happens
every 20 frames… hence the perceived lag (ie debug geometries running behind for a while
and then getting synchronized in a cyclic way).
(In order to work properly the sync should have happen at frame level dictated by t1)