Fix incorrect brickmap index in HitInfo result

This commit is contained in:
Jarrod Doyle 2023-05-06 12:27:28 +01:00
parent 3896027ea9
commit eb6b530080
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 1 additions and 0 deletions

View File

@ -247,6 +247,7 @@ fn grid_cast_ray(orig_ray_pos: vec3<f32>, ray_dir: vec3<f32>) -> HitInfo {
hit_info.hit = tmp_voxel_hit.hit; hit_info.hit = tmp_voxel_hit.hit;
hit_info.hit_pos = tmp_voxel_hit.hit_pos + (map_pos * 8); hit_info.hit_pos = tmp_voxel_hit.hit_pos + (map_pos * 8);
hit_info.mask = tmp_voxel_hit.mask; hit_info.mask = tmp_voxel_hit.mask;
hit_info.brickmap_idx = tmp_voxel_hit.brickmap_idx;
break; break;
} }
} }