mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
rays fixed
This commit is contained in:
parent
5bc75c3f2d
commit
1e39b5d05d
4 changed files with 192 additions and 235 deletions
|
|
@ -234,8 +234,9 @@ voxel* Chunks::rayCast(vec3 start,
|
|||
const AABB& box = def->rotatable
|
||||
? def->rt.hitboxes[voxel->rotation()]
|
||||
: def->hitbox;
|
||||
rayvec3 in, out; // <- now not used, but for future...
|
||||
if (Rays::rayIntersectAABB(start, dir, iend, box, maxDist, in, out, norm) > RayRelation::None){
|
||||
scalar_t distance;
|
||||
if (Rays::rayIntersectAABB(start, dir, iend, box, maxDist, norm, distance) > RayRelation::None){
|
||||
end = start + (dir * vec3(distance));
|
||||
return voxel;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue