Skip to content

Commit da76d7b

Browse files
author
lawwong
committed
Fix CustomDeviceHeight update with wrong axis value
1 parent d6d8b51 commit da76d7b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Assets/HTC.UnityPlugin/ViveInputUtility/Examples/Shared/Scripts/CustomDeviceHeight.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,21 @@ public void UpdateHeight()
5858
switch (VRModule.activeModule)
5959
{
6060
case VRModuleActiveEnum.DayDream:
61-
transform.localPosition = new Vector3(pos.x, m_height, pos.y);
61+
transform.localPosition = new Vector3(pos.x, m_height, pos.z);
6262
break;
6363
#if VIU_OCULUSVR && !VIU_OCULUSVR_19_0_OR_NEWER
6464
case VRModuleActiveEnum.OculusVR:
6565
if (OVRPlugin.GetSystemHeadsetType().Equals(OVRPlugin.SystemHeadset.Oculus_Go))
6666
{
67-
transform.localPosition = new Vector3(pos.x, m_height, pos.y);
67+
transform.localPosition = new Vector3(pos.x, m_height, pos.z);
6868
}
6969
break;
7070
#endif
7171
#if UNITY_2019_2_OR_NEWER && !UNITY_2019_3_OR_NEWER
7272
case VRModuleActiveEnum.UnityNativeVR:
7373
if (XRDevice.model.Equals("Oculus Go"))
7474
{
75-
transform.localPosition = new Vector3(pos.x, m_height, pos.y);
75+
transform.localPosition = new Vector3(pos.x, m_height, pos.z);
7676
}
7777
break;
7878
#endif

0 commit comments

Comments
 (0)