You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the game I'm working on (along with several others previously) I prefer using tile unit positions rather than pixel unit positions. Think rather than a 32x32 box for each tile, a 1x1 box for each tile, and everything else in the world to a similar scale.
This almost works with bump (things do collide mostly correctly and performance is fine using an 8x8 spatial hash on a 512x20 map), but seems to brush up against some floating point error issues that result in "snags" that don't occur at larger scales.
To be clear, I'm not talking about performance hitches, but erroneous collisions against neighbouring (internal) tile edges while walking from one tile to another. I haven't had similar issues when writing similar AABB solutions myself (albeit usually without the swept AABB collisions), so it may be some bump-specific optimisation meddling here. Adjusting the DELTA inside bump didn't seem to help anything, and I didn't have the patience to dig further into the internals and find out what might be causing it.
I've managed to workaround this by scaling everything up by a factor of 32 for bump only, allowing me to work in other units for the rest of my game while keeping bump happy - but I figured I'd report it as it may save someone else a headache and maybe @kikito has some insight into why this otherwise great lib may have trouble with unit boxes 👍
The text was updated successfully, but these errors were encountered:
Yeah, I'm getting it too, with 0.5 tile sizes and 1 as well. When I tried changing DELTA to 0 I began getting pushed on top of blocks that I was supposed to be hitting the sides of.
In the game I'm working on (along with several others previously) I prefer using tile unit positions rather than pixel unit positions. Think rather than a 32x32 box for each tile, a 1x1 box for each tile, and everything else in the world to a similar scale.
This almost works with bump (things do collide mostly correctly and performance is fine using an 8x8 spatial hash on a 512x20 map), but seems to brush up against some floating point error issues that result in "snags" that don't occur at larger scales.
To be clear, I'm not talking about performance hitches, but erroneous collisions against neighbouring (internal) tile edges while walking from one tile to another. I haven't had similar issues when writing similar AABB solutions myself (albeit usually without the swept AABB collisions), so it may be some bump-specific optimisation meddling here. Adjusting the
DELTA
inside bump didn't seem to help anything, and I didn't have the patience to dig further into the internals and find out what might be causing it.I've managed to workaround this by scaling everything up by a factor of 32 for bump only, allowing me to work in other units for the rest of my game while keeping bump happy - but I figured I'd report it as it may save someone else a headache and maybe @kikito has some insight into why this otherwise great lib may have trouble with unit boxes 👍
The text was updated successfully, but these errors were encountered: