Skip to content

Commit f42ab2d

Browse files
author
Avaer Kazmer
committed
Use mesh dolly for avatar and bone helper meshes
1 parent 506837d commit f42ab2d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

vrarmik.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -690,12 +690,12 @@ <h3>Examples</h3>
690690

691691
mesh.onBeforeRender2 = () => {
692692
if (model && session) {
693-
model.visible = true;
693+
meshDolly.visible = true;
694694
}
695695
};
696696
mesh.onAfterRender2 = () => {
697697
if (model && session) {
698-
model.visible = false;
698+
meshDolly.visible = false;
699699
}
700700
};
701701

@@ -712,21 +712,21 @@ <h3>Examples</h3>
712712
let heightFactor = 0;
713713
const _rigModel = object => {
714714
if (rig) {
715-
scene.remove(model);
715+
meshDolly.remove(model);
716716
rig = null;
717717
model = null;
718718
}
719719

720720
model = object;
721721
if (session) {
722-
model.visible = false;
722+
meshDolly.visible = false;
723723
}
724724
rig = new Rig(model, {
725725
hair: true,
726726
visemes: true,
727727
microphoneMediaStream,
728728
});
729-
scene.add(model);
729+
meshDolly.add(model);
730730
window.model = model;
731731

732732
// heightOffset = userHeight - rig.height;
@@ -913,7 +913,7 @@ <h3>Examples</h3>
913913
requiredFeatures: ['local-floor'],
914914
});
915915
if (model) {
916-
model.visible = false;
916+
meshDolly.visible = false;
917917
}
918918
let referenceSpace;
919919
let referenceSpaceType = '';

0 commit comments

Comments
 (0)