Open jimrange opened 9 years ago
Hopefully this bug can be confirmed and added to 3.8. I think this is a critical bug since it results in strange and unexpected behavior, essentially making the physics wrapper unusable without the temporary workaround I mentioned above.
I think it is important to fix this. A workaround I use is to use scheduleOnce to set autoUpdate = false and manually guarantee this scheduleOnce is the first one to be executed.
@dredok, can you provide more information about how you manually guarantee that the scheduleOnce is the first one to be executed. I am having some inconsistent results with the workaround that I proposed and want to try your fix.
I figured out another hack that helps to stabilize the physics world initialization. The delay in changing from autostep to manual step that I described as my workaround had an issue. To fix the issue, I do the following immediately after creating the scene that has physics enabled.
_scene->getPhysicsWorld()->setSpeed(0);
Then after a short delay I call getPhysicsWorld()->setAutoStep(true) and start stepping the physics simulation.
@WenhaiLin, did you have any issues reproducing this issue? Just curious why it is marked as unconfirmed.
@jimrange By manually I mean that I know the flow of my instances and so I schedule this on a node which will be updated before any other node (for instance, the layer where physics world resides, which I know has more priority than any of its children). That's dirty and that's what I mean by "manually guarantee".
Hi , Any possible fix for this issue?