Browse Source

Add frustumculled = false because skinnedmesh disappear

Fernando Serrano 5 years ago
parent
commit
057f570e7d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      examples/jsm/webxr/XRHandOculusMeshModel.js

+ 3 - 1
examples/jsm/webxr/XRHandOculusMeshModel.js

@@ -14,7 +14,9 @@ class XRHandOculusMeshModel {
 		loader.load( `/examples/models/fbx/OculusHand_${handedness === "right" ? "R" : "L"}${low}.fbx`, object => {
 
 			this.handModel.add( object );
+			// Hack because of the scale of the skinnedmesh
 			object.scale.setScalar( 0.01 );
+			object.getObjectByProperty( "type", "SkinnedMesh" ).frustumCulled = false;
 
 			const bonesMapping = [
 				'b_%_wrist', // XRHand.WRIST,
@@ -100,4 +102,4 @@ class XRHandOculusMeshModel {
 
 }
 
-export { XRHandOculusMeshModel }
+export { XRHandOculusMeshModel };