nfagerlund / bevy-tablestakes

takin a new thing for a spin
0 stars 0 forks source link

Simplified spatial lookup implementation #8

Closed nfagerlund closed 1 year ago

nfagerlund commented 1 year ago

I was gonna upgrade to bevy 0.10, but as it happens I JUsT picked up a dependency on bevy_spatial, whose author decided to do a rewrite before supporting 0.10. Whoooops

But the code's pretty comprehensible and 90% of its complexity comes from being more generic than I need. So I can just rip out that rstar crate dep on its own and do a chopped-down re-impl.

HOWEVER, it also turns out that bevy_spatial was using (local) Transform, and I need to be using my physics space transforms instead to get global accuracy for objects that participate in physics. And that might add some more complexity.

So, as a pre-requisite for this, it's time to codify the small offset hack I was doing into a more ergonomic interface for handling positions.

nfagerlund commented 1 year ago

OK so uhhhhh let's see. About that.

nfagerlund commented 1 year ago

Yeah okay, that worked great! Now onwards to building out my own spatial lookup utilization.

nfagerlund commented 1 year ago

All right, that ALSO worked great.