fix: Create and destroy joints after world has been locked#110
fix: Create and destroy joints after world has been locked#110luanpotter merged 1 commit intomainfrom
Conversation
|
As requested, I tried this branch locally and yes, it does appear to fix the issue I encountered. Joints are now created as expected (I didn't try destroying joints but the code looks good to me). Since earlier versions just asserted that the world wasn't locked, my project has always queued such operations. When adding new code, I just forgot to queue and hit the issue. So I won't actually depend on this fix since I'll continue to queue operations myself, but I think it's definitely a good fix to have. Note that making the lists private is technically a breaking change, but it's unlikely anyone would access them. Thank you for the speedy update! |
Yeah, I had the same thinking, so didn't mark it as breaking. I'll publish a new version once I get a review from someone else in the team. |
| bodiesToDestroy.clear(); | ||
| _bodiesToDestroy.clear(); | ||
|
|
||
| for (final joint in _jointsToCreate) { |
There was a problem hiding this comment.
did this just... never worked? haha
There was a problem hiding this comment.
Haha yeah, but it's quite new
|
@drrnbrns it's now released :) |
Description
This fixes so that the queued up joints are actually created and destroyed when the world is stepped.
Checklist
fix:,feat:,docs:etc).docsand added dartdoc comments with///.examples.Breaking Change
Related Issues