File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Assets/HoloToolkit/Input/Scripts/Gaze Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,15 @@ private void InteractionManager_InteractionSourceUpdated(InteractionSourceUpdate
148148 }
149149 }
150150
151- if ( EnableRotation && ! teleporting )
151+ if ( EnableStrafe && ! teleporting && ! fadeControl . Busy )
152+ {
153+ if ( obj . state . thumbstickPosition . y < - 0.8 && Math . Abs ( obj . state . thumbstickPosition . x ) < 0.2 )
154+ {
155+ DoStrafe ( Vector3 . back * StrafeAmount ) ;
156+ }
157+ }
158+
159+ if ( EnableRotation && ! teleporting && ! fadeControl . Busy )
152160 {
153161 if ( obj . state . thumbstickPosition . x < - 0.8 && Math . Abs ( obj . state . thumbstickPosition . y ) < 0.2 )
154162 {
@@ -215,6 +223,8 @@ public void DoStrafe(Vector3 strafeAmount)
215223 0.25f , // Fade in time
216224 ( ) => // Action after fade out
217225 {
226+ Transform transformToRotate = Camera . main . transform ;
227+ transformToRotate . rotation = Quaternion . Euler ( 0 , transformToRotate . rotation . eulerAngles . y , 0 ) ;
218228 transform . Translate ( strafeAmount , Camera . main . transform ) ;
219229 } , null ) ; // Action after fade in
220230 }
You can’t perform that action at this time.
0 commit comments