Skip to content

Commit beed068

Browse files
author
David Kline
authored
Merge pull request #9862 from RogPodge/UseMRTKControllerViz
Make Oculus use MRTK visualization by default
2 parents d8f12f4 + cd2e7bd commit beed068

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

Assets/MRTK/Providers/Oculus/XRSDK/Controllers/OculusXRSDKTouchController.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -92,24 +92,24 @@ protected override void UpdateButtonData(MixedRealityInteractionMapping interact
9292
}
9393

9494
/// <summary>
95-
/// Determines whether or not this controller uses MRTK for controller visualization or not
95+
/// Determines whether or not this controller is using MRTK for controller visualization
96+
///
97+
/// When false, the Oculus Touch controller model visualization will not be managed by MRTK
98+
/// Ensure that the Oculus Integration Package is installed and the Ovr Camera Rig is set correctly in the Oculus XRSDK Device Manager to use the
99+
/// Oculus Integration Package's visualization
96100
/// </summary>
97-
internal bool UseMRTKControllerVisualization { get; set; } = false;
98-
99-
/// <inheritdoc/>
100-
/// <remarks>
101-
/// If UseMRTKControllerVisualization is false, Oculus Touch controller model visualization will not be managed by MRTK
102-
/// Ensure that the Oculus Integration Package is installed and the Ovr Camera Rig is set correctly in the Oculus XRSDK Device Manager
103-
/// </remarks>
104-
protected override bool TryRenderControllerModel(Type controllerType, InputSourceType inputSourceType)
101+
internal bool UseMRTKControllerVisualization
105102
{
106-
if (UseMRTKControllerVisualization)
103+
get
107104
{
108-
return base.TryRenderControllerModel(controllerType, inputSourceType);
105+
return Visualizer != null && Visualizer.GameObjectProxy != null && Visualizer.GameObjectProxy.activeSelf;
109106
}
110-
else
107+
set
111108
{
112-
return false;
109+
if(Visualizer != null && Visualizer.GameObjectProxy)
110+
{
111+
Visualizer.GameObjectProxy.SetActive(value);
112+
}
113113
}
114114
}
115115
}

0 commit comments

Comments
 (0)