@@ -169,6 +169,8 @@ public IEnumerator NearInteractionTouchablePointerEvents()
169169 touchable . SetBounds ( new Vector2 ( 0.5f , 0.5f ) ) ;
170170 touchable . EventsToReceive = TouchableEventType . Pointer ;
171171
172+ int numSteps = 10 ;
173+
172174 yield return new WaitForFixedUpdate ( ) ;
173175 yield return null ;
174176
@@ -177,34 +179,34 @@ public IEnumerator NearInteractionTouchablePointerEvents()
177179 using ( var catcher = CreatePointerEventCatcher ( touchable ) )
178180 {
179181 // Touch started and completed when entering and exiting
180- yield return PlayModeTestUtilities . MoveHand ( initialHandPosition , objectPosition , ArticulatedHandPose . GestureId . Open , Handedness . Right , inputSim ) ;
182+ yield return PlayModeTestUtilities . MoveHand ( initialHandPosition , objectPosition , ArticulatedHandPose . GestureId . Open , Handedness . Right , inputSim , numSteps ) ;
181183 Assert . AreEqual ( 1 , catcher . EventsStarted ) ;
182184 Assert . AreEqual ( 0 , catcher . EventsCompleted ) ;
183- yield return PlayModeTestUtilities . MoveHand ( objectPosition , rightPosition , ArticulatedHandPose . GestureId . Pinch , Handedness . Right , inputSim ) ;
185+ yield return PlayModeTestUtilities . MoveHand ( objectPosition , rightPosition , ArticulatedHandPose . GestureId . Pinch , Handedness . Right , inputSim , numSteps ) ;
184186 Assert . AreEqual ( 1 , catcher . EventsStarted ) ;
185187 Assert . AreEqual ( 1 , catcher . EventsCompleted ) ;
186188 Assert . Greater ( catcher . DragEventCount , 0 ) ;
187189
188190 // Touch started and completed when entering and exiting behind the plane
189- yield return PlayModeTestUtilities . MoveHand ( initialHandPosition , objectPosition , ArticulatedHandPose . GestureId . Open , Handedness . Right , inputSim ) ;
191+ yield return PlayModeTestUtilities . MoveHand ( initialHandPosition , objectPosition , ArticulatedHandPose . GestureId . Open , Handedness . Right , inputSim , numSteps ) ;
190192 Assert . AreEqual ( 2 , catcher . EventsStarted ) ;
191193 Assert . AreEqual ( 1 , catcher . EventsCompleted ) ;
192- yield return PlayModeTestUtilities . MoveHand ( objectPosition , backPosition , ArticulatedHandPose . GestureId . Pinch , Handedness . Right , inputSim ) ;
194+ yield return PlayModeTestUtilities . MoveHand ( objectPosition , backPosition , ArticulatedHandPose . GestureId . Pinch , Handedness . Right , inputSim , numSteps ) ;
193195 Assert . AreEqual ( 2 , catcher . EventsStarted ) ;
194196 Assert . AreEqual ( 2 , catcher . EventsCompleted ) ;
195197 Assert . Greater ( catcher . DragEventCount , 1 ) ;
196198 int dragEventCount = catcher . DragEventCount ;
197199
198200 // No touch when moving at behind the plane
199- yield return PlayModeTestUtilities . MoveHand ( backPosition , rightPosition , ArticulatedHandPose . GestureId . Pinch , Handedness . Right , inputSim ) ;
201+ yield return PlayModeTestUtilities . MoveHand ( backPosition , rightPosition , ArticulatedHandPose . GestureId . Pinch , Handedness . Right , inputSim , numSteps ) ;
200202 Assert . AreEqual ( 2 , catcher . EventsStarted ) ;
201203 Assert . AreEqual ( 2 , catcher . EventsCompleted ) ;
202204 Assert . AreEqual ( dragEventCount , catcher . DragEventCount , "No drag events should fire when poke pointer moving behind plane" ) ;
203205
204206
205207 // No touch when moving outside the bounds
206- yield return PlayModeTestUtilities . MoveHand ( initialHandPosition + outOfBoundsOffset , objectPosition + outOfBoundsOffset , ArticulatedHandPose . GestureId . Open , Handedness . Right , inputSim ) ;
207- yield return PlayModeTestUtilities . MoveHand ( objectPosition + outOfBoundsOffset , rightPosition , ArticulatedHandPose . GestureId . Open , Handedness . Right , inputSim ) ;
208+ yield return PlayModeTestUtilities . MoveHand ( initialHandPosition + outOfBoundsOffset , objectPosition + outOfBoundsOffset , ArticulatedHandPose . GestureId . Open , Handedness . Right , inputSim , numSteps ) ;
209+ yield return PlayModeTestUtilities . MoveHand ( objectPosition + outOfBoundsOffset , rightPosition , ArticulatedHandPose . GestureId . Open , Handedness . Right , inputSim , numSteps ) ;
208210 Assert . AreEqual ( 2 , catcher . EventsStarted ) ;
209211 Assert . AreEqual ( 2 , catcher . EventsCompleted ) ;
210212 Assert . AreEqual ( dragEventCount , catcher . DragEventCount , "No drag events should fire when poke pointer moving outside bounds" ) ;
0 commit comments