Trouv / bevy_ecs_ldtk

ECS-friendly ldtk plugin for bevy, leveraging bevy_ecs_tilemap
Other
664 stars 75 forks source link

improve ground detection #137

Closed janos-r closed 1 year ago

janos-r commented 1 year ago

The ground detection was checked every tick, and the collision event system was always iterating the sensor before the collision events. I'm not sure, but it feels like bad practice. This PR might be just a personal preference. But it feels to me more readable and better practice/performance. Thank you for the consideration and any response.

PS: I left the DebugRender in, as recently the grid update shifted the colliders (nicely visible with this plugin). I'm sure somebody is already considering a fix for this.

Trouv commented 1 year ago

Thanks for the contribution!

PS: I left the DebugRender in, as recently the grid update shifted the colliders (nicely visible with this plugin). I'm sure somebody is already considering a fix for this.

That would be #136

This seems pretty reasonable to me, but I'd prefer not to merge that DebugRender line into main

janos-r commented 1 year ago

This seems pretty reasonable to me, but I'd prefer not to merge that DebugRender line into main

Sorry, I was hoping it would get there before the big fix. I took it out, hope its fine now. Thanks