def _set_grid_pos(self):
        """ Finds the new voxel grid position """
        grid_pos = Globals.base.camera.get_pos(Globals.base.render)

        # Snap the voxel grid
        voxel_size = 2.0 * self.get_setting("grid_ws_size") / self.get_setting("grid_resolution")
        snap_size = voxel_size * 2**4

        for dimension in range(3):
            cell_val = grid_pos.get_cell(dimension)
            grid_pos.set_cell(dimension, cell_val - cell_val % snap_size)

        self._voxel_stage.set_grid_position(grid_pos)
 Finds the new voxel grid position 
metadrive/render_pipeline/rpplugins/vxgi/plugin.py