-
Notifications
You must be signed in to change notification settings - Fork 30
fix: Create and destroy joints after world has been locked #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did this just... never worked? haha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha yeah, but it's quite new
luanpotter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@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