Cant find bullet tick callback in panda 3d

Hi. enjoying Panda3d a bunch.

Am using the bullet integration, but one thing I can’t find is the tick callback function.

Now I know I am probably just not looking on the right place, but I’d find this functionality very useful in moderating max speed etc on my geometry.

see what i am talking about more coherently here…

bulletphysics.org/mediawiki-1.5.8/index.php/Simulation_Tick_Callbacks

You don’t find it because we don’t have this callback exposed. You can set it from C++ though. From Python it does not make much sense. In particular since from Python everybody uses variable timesteps, and thus framerate independences is limited anyway.

For those who really want to mess around with tick callbacks: I have added it in the current snapshot builds.

You can have a different callback set for each world. This is how to set a callback.

  o = PythonCallbackObject(self.func)
  self.world.setTickCallback(o) 

Of course you need to implement a callback too. The callback data has only one parameter, the timestep.

def func(self, data):
  timestep = data.getTimestep()
  ... do something ...