Skip to content

Commit 3322067

Browse files
Stephen HodgsonStephen Hodgson
authored andcommitted
Updated Gaze Manager to include a bool for using built in gaze stabilizor.
1 parent 3604ba2 commit 3322067

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Assets/HoloToolkit/Input/Scripts/GazeManager.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ public partial class GazeManager : Singleton<GazeManager>
4040
[Tooltip( "Lerp speed when moving focus point farther away." )]
4141
public float LerpStabilizationPlanePowerFarther = 7.0f;
4242

43+
/// <summary>
44+
/// Use built in gaze stabilization that utilizes gavity wells.
45+
/// Change to false if you wish to use your own gabilization calculation
46+
/// and extend this class.
47+
/// </summary>
48+
[Tooltip("Use built in gaze stabilization that utilizes gavity wells.")]
49+
public bool UseBuiltInGazeStabilization = true;
50+
4351
/// <summary>
4452
/// Physics.Raycast result is true if it hits a hologram.
4553
/// </summary>
@@ -77,7 +85,10 @@ public partial class GazeManager : Singleton<GazeManager>
7785

7886
private void Awake()
7987
{
80-
GazeStabilization = gameObject.GetComponent<GazeStabilizer>();
88+
if (UseBuiltInGazeStabilization)
89+
{
90+
GazeStabilization = gameObject.AddComponent<GazeStabilizer>();
91+
}
8192
}
8293

8394
private void Update()

0 commit comments

Comments
 (0)