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
vRayStart is truncated from an olc::vf2d to an olc::vi2d. This works fine in the positive x and y axis, but will lead to issues otherwise. I think a comment should be left to note that the truncation will lead to issues. A component-wise flooring will work as intended for negative values.
here is an example of what will go wrong:
I adapted the olc implementation for 3D, in my voxel game. You can see the perspective camera is not situated in the positive xyz axis, and aiming roughly down the xy plane will lead to an inaccurate selection or no selection returned at all.
here is the same example but using a component-wise flooring instead:
The text was updated successfully, but these errors were encountered:
On line 107:
https://github.com/OneLoneCoder/Javidx9/tree/master/PixelGameEngine/SmallerProjects/OneLoneCoder_PGE_RayCastDDA.cpp
vRayStart is truncated from an olc::vf2d to an olc::vi2d. This works fine in the positive x and y axis, but will lead to issues otherwise. I think a comment should be left to note that the truncation will lead to issues. A component-wise flooring will work as intended for negative values.
here is an example of what will go wrong:
I adapted the olc implementation for 3D, in my voxel game. You can see the perspective camera is not situated in the positive xyz axis, and aiming roughly down the xy plane will lead to an inaccurate selection or no selection returned at all.
here is the same example but using a component-wise flooring instead:
The text was updated successfully, but these errors were encountered: