-
Notifications
You must be signed in to change notification settings - Fork 330
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
Buoyancy demo nitpick #262
Comments
It's not technically a bug, because the user cannot change the position of the plane in the demo? In any case you're right and it should be using the correct bounds, if someone wants to reuse the code. Wanna submit a PR? |
You're right. In fact that's how I spotted this, I was adapting it for my own project. Yes, I'll submit a pull request. I found some other things along the way that I think would be worth having in the demo, so I'll include those as well. For instance, The applied force for each shape can be multiplied by |
Pull request #263 submitted. I decided not to include the |
In the buoyancy demo, if I put the "water" plane at a different Y position, the objects float at a different depth. Try setting
plane.position[1]
to -1 or 1, and see where the shapes come to rest.I believe this is because of a bug on line 89:
This is meant to compute the height of the portion of the shape's bounding box that is "underwater". I think that
0
should actually beplanePosition[1]
, so like this:The text was updated successfully, but these errors were encountered: