mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-15 07:51:50 +00:00
remove third person cameras height limitation
This commit is contained in:
parent
b6ceadcee7
commit
ec4043bc12
1 changed files with 22 additions and 23 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue