Skip to content

Commit 2c52acb

Browse files
author
David Kline
authored
Merge pull request #3038 from tarukosu/improve_stabilization_plane
Set minimum distance of stabilization plane to nearclip distance of camera
2 parents c036b2e + a92e08f commit 2c52acb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Assets/HoloToolkit/Utilities/Scripts/StabilizationPlaneModifier.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ private void ConfigureGazeManagerPlane(float deltaTime)
210210
if (TryGetGazeHitPosition(out gazeHitPosition))
211211
{
212212
focusPointDistance = (gazeOrigin - gazeHitPosition).magnitude;
213+
var nearClipPlane = CameraCache.Main.nearClipPlane;
214+
focusPointDistance = Mathf.Max(focusPointDistance, nearClipPlane);
213215
}
214216
else
215217
{

0 commit comments

Comments
 (0)