-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Use a circle for the ball in Breakout #4324
Comments
I have a feeling that in practice, not doing proper circle-aabb collision would end up looking pretty janky, but I'd personally love to see that if it doesn't complicate the example too much. |
as a side note, this could already be done by using a round image, like https://github.com/bevyengine/bevy/blob/main/assets/branding/icon.png |
#3730 is merged so this is now quite easy :) |
I made a PR pretty much exactly the same as the #4682, if there is no answer from the creator of that PR, I can submit mine if you wish. |
Yes please @galkowskit :) Just link to the other PR and we'll credit you both. |
So the obvious collision "corner case" is this sort of thing: corner-case-heh.movWe could
I have a slight preference for 2 but it seems like fixing the collision code would be sort of involved, so I suppose I don't really mind 1. |
I think it also touches the physics issue. There is a very rudimentary code for reflections. |
# Objective - Replace the square with a circle in the breakout example. - Fixes bevyengine#4324, adopted from bevyengine#4682 by @shaderduck. ## Solution - Uses the Mesh2D APIs to draw a circle. The collision still uses the AABB algorithm, but it seems to be working fine, and I haven't seen any odd looking cases.
# Objective - Replace the square with a circle in the breakout example. - Fixes bevyengine#4324, adopted from bevyengine#4682 by @shaderduck. ## Solution - Uses the Mesh2D APIs to draw a circle. The collision still uses the AABB algorithm, but it seems to be working fine, and I haven't seen any odd looking cases.
# Objective - Replace the square with a circle in the breakout example. - Fixes bevyengine#4324, adopted from bevyengine#4682 by @shaderduck. ## Solution - Uses the Mesh2D APIs to draw a circle. The collision still uses the AABB algorithm, but it seems to be working fine, and I haven't seen any odd looking cases.
Hi, I'm trying to make a (modified) billiards game and need to detect to collision between balls. I was wondering if there already exists an implementation within bevy or whether I should make my own (and if its good/suitable enough I can contribute it back to bevy?). I've never contributed before so I'm not sure how this works. Thank you! |
Bevy currently only has Axis Aligned Bounding Box for collisions, which probably wouldn't work very well for billiard |
Once #3730 is merged, we should represent the ball as a circle, rather than a square. We can probably stick with the AABB collision though for simplicity.
The text was updated successfully, but these errors were encountered: