Skip to content

Replace collision code in breakout example with code based Aabb2d::intersects #11479

@rparrett

Description

@rparrett

What problem does this solve or what need does it fill?

After #11439, it seems like it might be possible to nuke the breakout example's custom collision code.

The breakout example makes use of bevy::sprite::collide_aabb::collide which exists in Bevy solely to make this particular example work.

The current collision code also assumes that the ball is a rectangle, which is no longer true!

What solution would you like?

Replace the code in breakout with code based on the new bounding volume intersection stuff introduced in #11439 and remove bevy::sprite::collide_aabb::collide from Bevy.

breakout is relying on collide_aabb::collide determining "which side of the thing was collided with," so this is slightly more involved than it sounds on the surface.

What alternative(s) have you considered?

Maybe I've misjudged and it's not time for this yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-PhysicsCollisions, kinematics, forces and moreC-ExamplesAn addition or correction to our examplesC-FeatureA new feature, making something new possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions