Bullet's "do_physics" in Python and C++

This issue on GitHub notes that, when used from Python, Bullet’s “do_physics” method can result in performance loss.

Is there then a way to have it be run automatically in on the C++ side? Or would the only way be to develop on the C++ side, and thence run it oneself?

We could make a BulletTask object in C++ that you can instantiate and add to the task manager from Python. That way, the task manager never has to call into Python code since the task function itself is pure C++.

I’d be surprised if this is actually a measurable problem, though, especially since the fix I have checked in for that issue allows Python threads to continue to run while doPhysics runs. It might be relevant when compiling for WebGL, where the overhead from running the Python interpreter is non-negligible.

Aah, fair enough! Well, I won’t worry about then, I intend. Thank you for the answer! :slight_smile: