parry icon indicating copy to clipboard operation
parry copied to clipboard

is_voxel_in_bounds for 2d uses wrong index

Open shadowcatzero opened this issue 5 months ago • 0 comments

https://github.com/dimforge/parry/blob/025c77d2ee438dde2c9dfc8cd81f60cceaab35e4/src/shape/voxels.rs#L534

I'm pretty sure the 1 there is not intended (should be 0 to compare with min x). I'm using rapier and wrote my own method that does that + try_set_voxel which worked; originally it wasn't able to resize in the -x direction under certain circumstances as you'd expect. It looks like a place you may wanna use [T; N]::map instead to make it harder to mess up, but I don't know the performance implications nor does it seem like [T;N]::all exists.

shadowcatzero avatar Jul 29 '25 00:07 shadowcatzero