Fix broken Terrain::raycast when it falls back to isolevel channel

This commit is contained in:
Marc Gilleron 2019-04-28 01:29:52 +01:00
parent 0f378fe218
commit fe37ed3674
1 changed files with 2 additions and 2 deletions

View File

@ -866,8 +866,8 @@ static bool _raycast_binding_predicate(Vector3i pos, void *context_ptr) {
if (voxel.is_transparent() == false)
return true;
int v1 = map->get_voxel(pos, Voxel::CHANNEL_ISOLEVEL);
return v1 - 128 >= 0;
float v1 = map->get_voxel_f(pos.x, pos.y, pos.z, Voxel::CHANNEL_ISOLEVEL);
return v1 < 0;
}
void VoxelTerrain::_make_area_dirty_binding(AABB aabb) {