You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clicking triggers onFire which in the demo sets the voxel located at game.raycastVoxel(), but this only matches voxels the player is actually located inside:
(picture above shows the player inside the solid stone voxels, clicking to place)
On the other side of the valley (inside it, within air voxels), game.raycastVoxels() always returns false. Since maxDistance defaults to 10, it should at least match voxels ten blocks away.
deathcap
changed the title
Raytracing broken, only finds voxels the player is within
Raycasting broken, only finds voxels the player is within
May 6, 2014
deathcap
added a commit
to deathcap/voxel-engine
that referenced
this issue
May 6, 2014
voxel-example no longer includes an example of raycasting, but testing with voxel-example and adding voxel-outline 0.4.3 and voxel-voila 0.6.0, raycasting appears to be working correctly:
Clicking triggers
onFire
which in the demo sets the voxel located atgame.raycastVoxel()
, but this only matches voxels the player is actually located inside:(picture above shows the player inside the solid stone voxels, clicking to place)
On the other side of the valley (inside it, within air voxels),
game.raycastVoxels()
always returnsfalse
. SincemaxDistance
defaults to 10, it should at least match voxels ten blocks away.raycastVoxels()
is implemented using: https://github.com/mikolalysenko/voxel-raycast - which only depends on thegetBlock()
API, so that's likely broken in deathcap/voxel-engine#ndarray, somehow.edit: raycasting not raytracing. Check the camera direction vector.
The text was updated successfully, but these errors were encountered: