This commit is contained in:
blueloveTH 2023-08-12 23:25:46 +08:00
parent 18390fc8cf
commit 65219da87f

View File

@ -93,6 +93,9 @@ void PyWorld::_register(VM* vm, PyObject* mod, PyObject* type){
vm->bind(type, "step(self, dt: float, velocity_iterations: int, position_iterations: int)",
[](VM* vm, ArgsView args){
// disable gc during step for safety
auto _lock = vm->heap.gc_scope_lock();
PyWorld& self = _CAST(PyWorld&, args[0]);
float dt = CAST(float, args[1]);
int velocity_iterations = CAST(int, args[2]);