Description
The execution scheme document says that dSpaceCollide
is called before webots_physics_step()
:
webots/docs/reference/execution-scheme.md
Lines 12 to 13 in edf2c18
However in the code, it looks like webots_physics_step()
is called before collisions. See:
webots/src/webots/engine/WbSimulationWorld.cpp
Lines 241 to 249 in edf2c18
webots_physics_step()
is called as a result of line 242 and collisions are done during the execution of line 249 (in particular, mCluster->step()
calls dWorldStepAndSpaceCollide()
.
I've marked this as a documentation bug for now, but it's not clear if the current order in the code is intentional/desirable. In particular, the current order precludes a physics plugin from influencing the physics after all of the contact joints have been created.