remove third person cameras height limitation

This commit is contained in:
MihailRis
2024-07-17 19:12:59 +03:00
parent b6ceadcee7
commit ec4043bc12
+2 -3
View File
@@ -554,9 +554,7 @@ glm::vec3 Chunks::rayCastToObstacle(glm::vec3 start, glm::vec3 dir, float maxDis
while (t <= maxDist) {
voxel* voxel = get(ix, iy, iz);
if (voxel == nullptr) {
return glm::vec3(px + t * dx, py + t * dy, pz + t * dz);
}
if (voxel) {
const auto def = indices->blocks.get(voxel->id);
if (def->obstacle) {
if (!def->rt.solid) {
@@ -584,6 +582,7 @@ glm::vec3 Chunks::rayCastToObstacle(glm::vec3 start, glm::vec3 dir, float maxDis
return glm::vec3(px + t * dx, py + t * dy, pz + t * dz);
}
}
}
if (txMax < tyMax) {
if (txMax < tzMax) {
ix += stepx;