mirror of
https://github.com/Relintai/godot_voxel.git
synced 2024-11-19 02:47:18 +01:00
Fixed bad VoxelBuffer indexing for non-cubic volumes
This commit is contained in:
parent
b85e696b7b
commit
8c6defee09
@ -87,11 +87,11 @@ public:
|
||||
}
|
||||
|
||||
_FORCE_INLINE_ unsigned int index(unsigned int x, unsigned int y, unsigned int z) const {
|
||||
return (z * _size.z + x) * _size.x + y;
|
||||
return y + _size.y * (x + _size.x * z);
|
||||
}
|
||||
|
||||
// _FORCE_INLINE_ unsigned int row_index(unsigned int x, unsigned int y, unsigned int z) const {
|
||||
// return (z * _size.z + x) * _size.x;
|
||||
// return _size.y * (x + _size.x * z);
|
||||
// }
|
||||
|
||||
// TODO Rename get_cells_count()
|
||||
|
Loading…
Reference in New Issue
Block a user