@@ -728,29 +728,31 @@ public void Components_TrackedPoseDriver_RetainsPoseWhenTrackedDeviceRemoved()
728728 }
729729 }
730730
731- [ Test ]
732731 [ Category ( "Components" ) ]
733- public void Components_TrackedPoseDriver_RetainsPoseWhenNoTrackedDeviceIsConnected ( )
732+ public void Components_TrackedPoseDriver_RetainsPoseWhenNoActionIsBound ( )
734733 {
735734 // Tests/reproduces the scenario described in https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-699
736735 // i.e. that rotation and/or position is not updated if device is not connected and track state isn't ignored.
737736
738737 var position = new Vector3 ( 1f , 2f , 3f ) ;
739738 var rotation = new Quaternion ( 0.09853293f , 0.09853293f , 0.09853293f , 0.9853293f ) ;
740739
740+ // Setup GameObject to have a position and rotation that is different from identity transform
741741 var go = new GameObject ( ) ;
742742 go . transform . position = position ;
743743 go . transform . rotation = rotation ;
744744
745+ // Configure TrackedPoseDriver
745746 var tpd = go . AddComponent < TrackedPoseDriver > ( ) ;
746747 tpd . updateType = TrackedPoseDriver . UpdateType . Update ;
747748 tpd . trackingType = TrackedPoseDriver . TrackingType . RotationAndPosition ;
748749 tpd . ignoreTrackingState = false ;
749- var transform = tpd . transform ;
750750
751+ var transform = tpd . transform ;
751752 Assert . That ( transform . position , Is . EqualTo ( position ) ) ;
752753 Assert . That ( transform . rotation , Is . EqualTo ( rotation ) ) ;
753754
755+ // Ensure that position and/or rotation is not affected by update.
754756 InputSystem . Update ( InputUpdateType . Dynamic ) ;
755757
756758 Assert . That ( transform . position , Is . EqualTo ( position ) ) ;
0 commit comments