Skip to content

Commit c282ca3

Browse files
committed
Fixed issue causing the Oculus Touch input module to depend on a Steam VR extension method (#57).
1 parent 1e4eb12 commit c282ca3

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Unity/Assets/Hover/InputModules/OculusTouch/Scripts/OculusTouchCursor.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,10 @@ private bool TryUpdateDataWithAvatarElement(ICursorDataForInput pData, OvrAvatar
112112
/*--------------------------------------------------------------------------------------------*/
113113
private void UpdateDataWithLocalOffsets(ICursorDataForInput pData,
114114
HoverInputOculusTouch.ControlState pState) {
115-
Matrix4x4 txMat = OriginTransform.localToWorldMatrix;
116-
Matrix4x4 txRotMat = txMat*Matrix4x4.TRS(Vector3.zero, pState.LocalRot, Vector3.one);
117-
118-
pData.SetWorldPosition(txMat.MultiplyPoint3x4(pState.LocalPos)+
119-
txRotMat.MultiplyVector(LocalPosition));
120-
pData.SetWorldRotation(txRotMat.GetRotation()*Quaternion.Euler(LocalRotation));
115+
pData.SetWorldPosition(
116+
OriginTransform.TransformPoint(pState.LocalPos)+pState.LocalRot*LocalPosition);
117+
pData.SetWorldRotation(
118+
OriginTransform.rotation*pState.LocalRot*Quaternion.Euler(LocalRotation));
121119
}
122120

123121
/*--------------------------------------------------------------------------------------------*/

0 commit comments

Comments
 (0)