Fix "jitter" when moving cursor across block edges.

Use the maximum depth buffer value when converting from a screen position to a 3D ray to increase precision.

Not sure why it wasn't the maximum before.
This commit is contained in:
David Vierra 2015-06-04 02:30:47 -10:00
parent 817d42b522
commit 8207d12570

View File

@ -512,7 +512,7 @@ class WorldView(QGLWidget):
:rtype: Ray
"""
p0, p1 = self.pointsAtPositions((x, y, 0.0), (x, y, 0.1))
p0, p1 = self.pointsAtPositions((x, y, 0.0), (x, y, 1.0))
return Ray(p0, (p1 - p0).normalize())
def rayAtCenter(self):