Просмотр исходного кода

fix: use the same hand model clearing as used in OculusHandModel to prevent the hand models from looking inside out (#31634)

Co-authored-by: jorodi <jorodi@mpb16>
jorodi 7 месяцев назад
Родитель
Сommit
bc8f19db71
1 измененных файлов с 2 добавлено и 6 удалено
  1. 2 6
      examples/jsm/webxr/XRHandModelFactory.js

+ 2 - 6
examples/jsm/webxr/XRHandModelFactory.js

@@ -179,16 +179,12 @@ class XRHandModelFactory {
 
 			}
 
-			controller.visible = true;
-
 		} );
 
 		controller.addEventListener( 'disconnected', () => {
 
-			controller.visible = false;
-			// handModel.motionController = null;
-			// handModel.remove( scene );
-			// scene = null;
+			handModel.clear();
+			handModel.motionController = null;
 
 		} );
 

粤ICP备19079148号