File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Packages/com.janooba.immersive-interactions/Runtime/Button Assets/Scripts Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -185,8 +185,8 @@ public bool IsSleeping
185185 public Vector3 CrossAxis => ConvertAxisToVector ( rotationAxis ) ;
186186 public Vector3 OutAxis => ConvertAxisToVector ( outerAxis ) ;
187187
188- public Vector3 MinRotationVector => cached_base * Quaternion . Euler ( ConvertAxisToVector ( rotationAxis ) * minMaxRotation . x ) * Vector3 . forward ;
189- public Vector3 MaxRotationVector => cached_base * Quaternion . Euler ( ConvertAxisToVector ( rotationAxis ) * minMaxRotation . y ) * Vector3 . forward ;
188+ public Vector3 MinRotationVector => cached_base * Quaternion . Euler ( ConvertAxisToVector ( rotationAxis ) * minMaxRotation . x ) * OutAxis ;
189+ public Vector3 MaxRotationVector => cached_base * Quaternion . Euler ( ConvertAxisToVector ( rotationAxis ) * minMaxRotation . y ) * OutAxis ;
190190
191191 // Handle
192192 private Vector3 handleTargetPoint ;
@@ -279,7 +279,7 @@ private void CacheRotations()
279279 {
280280 cached_base = transform . localRotation ;
281281 cached_outAxis = OutAxis ;
282- cached_midOutAxis = Quaternion . Euler ( CrossAxis * Mathf . Lerp ( minMaxRotation . x , minMaxRotation . y , 0.5f ) ) * transform . forward ;
282+ cached_midOutAxis = Quaternion . Euler ( CrossAxis * Mathf . Lerp ( minMaxRotation . x , minMaxRotation . y , 0.5f ) ) * OutAxis ;
283283
284284 cached_top = Quaternion . Euler ( CrossAxis * minMaxRotation . x ) ;
285285 cached_bottom = Quaternion . Euler ( CrossAxis * minMaxRotation . y ) ;
You can’t perform that action at this time.
0 commit comments