Skip to content

Commit bf6ed63

Browse files
authored
Merge pull request #6469 from mozilla/bitecs-fix-inspect
Fix avatar self inspection
2 parents a8208fc + 0795abd commit bf6ed63

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/systems/inspect-yourself-system.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
import { isLockedDownDemoRoom } from "../utils/hub-utils";
22
import { paths } from "./userinput/paths";
3+
import { shouldUseNewLoader } from "../utils/bit-utils";
4+
import { addComponent } from "bitecs";
5+
import { Inspected, Inspectable } from "../bit-components";
6+
import { INSPECTABLE_FLAGS } from "../bit-systems/inspect-system";
37
export class InspectYourselfSystem {
48
tick(scene, userinput, cameraSystem) {
59
if (!scene.is("entered")) return;
610
if (userinput.get(paths.actions.startInspectingSelf) && !isLockedDownDemoRoom()) {
711
const rig = document.getElementById("avatar-rig");
12+
if (shouldUseNewLoader()) {
13+
addComponent(APP.world, Inspected, rig.eid);
14+
Inspectable.flags[rig.eid] |= INSPECTABLE_FLAGS.TARGET_CHANGED;
15+
}
816
cameraSystem.inspect(rig.object3D, 1.5);
917
}
1018
}

0 commit comments

Comments
 (0)