selection normal vector debug

This commit is contained in:
MihailRis
2023-11-30 15:04:20 +03:00
parent 0c35eeb072
commit cee0214ac5
5 changed files with 17 additions and 1 deletions
+1
View File
@@ -230,6 +230,7 @@ voxel* Chunks::rayCast(vec3 start,
end.y += dy / float(subs);
end.z += dz / float(subs);
if (box.inside(end)) {
end += iend;
norm.x = norm.y = norm.z = 0.0f;
if (steppedIndex == 0) norm.x = -stepx;
if (steppedIndex == 1) norm.y = -stepy;