mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Added flight mode ('F' button)
This commit is contained in:
parent
1dd9a72fb3
commit
b6c328fe1d
7 changed files with 30 additions and 9 deletions
|
|
@ -192,7 +192,7 @@ voxel* Chunks::rayCast(vec3 a, vec3 dir, float maxDist, vec3& end, vec3& norm, v
|
|||
|
||||
while (t <= maxDist){
|
||||
voxel* voxel = get(ix, iy, iz);
|
||||
if (voxel == nullptr || voxel->id){
|
||||
if (voxel == nullptr || Block::blocks[voxel->id]->selectable){
|
||||
end.x = px + t * dx;
|
||||
end.y = py + t * dy;
|
||||
end.z = pz + t * dz;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue