dtcristo / bevy_pixels

Bevy plugin that uses Pixels (a tiny pixel buffer) for rendering
https://docs.rs/bevy_pixels
Apache License 2.0
84 stars 12 forks source link

Example of bevy_pixels power with pixel collision #7

Closed pyweeker closed 2 years ago

pyweeker commented 2 years ago

Hello, maybe bevy_pixels shines with pixel collision with twisted shapes ? if possible, could you show this with a dragon curve shape or a fractal snowflake ?

dtcristo commented 2 years ago

I'm not sure what you're asking for here? Some kind of example?

I don't think pixel collision would be something this library would handle, as here we're just integrating the pixels renderer into a bevy application. It's quite simple.

pyweeker commented 2 years ago

hello, usually sprites are squares, maybe with alpha on edges, but the collision checker works on squares. if you have big shapes like this which collide https://stickeramoi.com/9556/sticker-etoile-de-mer.jpg it is processed as square collisions, which is wrong.

dtcristo commented 2 years ago

Yeah that makes sense. However, that's not really what bevy_pixels is used for. It's just a library to allow you to render a framebuffer to the screen using pixels where you write raw pixel data yourself. It has nothing to do with sprites or collisions. Seems like this capability should be part of bevy itself or a separate library.