Open Utsira opened 10 months ago
If you compare how an asymmetrical model appears in MV with Bevy, when loading via bevy_vox_mesh, the model is flipped on the x axis.
eg: the monu1 model that ships with MagicaVoxel as viewed in MV:
Same model in bevy:
I believe the fix for this is to change the linearisation in voxel.rs lines 35-37 to:
let index = model_shape.linearize([model.size.x - voxel.x as u32, voxel.z as u32 + 1, voxel.y as u32 + 1]) as usize;
this seems like the right place to flip the x axis, as this is where the Y and Z axes get swapped
I would gladly accept a pull request to fix this!
If you compare how an asymmetrical model appears in MV with Bevy, when loading via bevy_vox_mesh, the model is flipped on the x axis.
eg: the monu1 model that ships with MagicaVoxel as viewed in MV:
Same model in bevy:
I believe the fix for this is to change the linearisation in voxel.rs lines 35-37 to:
this seems like the right place to flip the x axis, as this is where the Y and Z axes get swapped