HDictus / breezefield

a physics library wrapper for love2d
MIT License
76 stars 5 forks source link

implement draw order #17

Closed HDictus closed 7 months ago

HDictus commented 1 year ago

you can now set a draw order for colliders, all…owing some to be drawn over others

alexmozaidze commented 1 year ago

There seems to be a bug regarding the Collider:destroy method. Whenever my code destroys any of the existing entities, it crashes on the next tick due to attempted use of destroyed body.

alexmozaidze commented 1 year ago

The draw order seems to be inconsistent. I presume it's because the _world._draw_order_changed isn't set to true when creating a new collider. I'll play around a little more and see what I can do.

alexmozaidze commented 1 year ago

Nevermind, the draw order works fine. I seem to have overwritten the world draw function in my project and kinda forgot about it, lol.

All systems seem to work wonders, the only thing to change is to remove debug prints.

alexmozaidze commented 1 year ago

Thanks for taking the time implementing this feature, I really appreciate it!

alexmozaidze commented 1 year ago

I opened a PR at #20 that fixes both of the issues.