Skip to content

Commit 746413d

Browse files
authored
Merge pull request #6478 from mozilla/bitecs-fix-pen
Fix pen VR
2 parents 190aca0 + cc3c62d commit 746413d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/systems/hold-system.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,13 @@ import {
1414
AEntity,
1515
Networked,
1616
MediaLoader,
17-
Deletable,
18-
PenActive
17+
Deletable
1918
} from "../bit-components";
2019
import { canMove } from "../utils/permissions-utils";
2120
import { canMove as canMoveEntity } from "../utils/bit-permissions-utils";
2221
import { isPinned } from "../bit-systems/networking";
2322
import { takeOwnership } from "../utils/take-ownership";
24-
import { anyEntityWith, findAncestorWithComponents } from "../utils/bit-utils";
23+
import { findAncestorWithComponents } from "../utils/bit-utils";
2524

2625
const GRAB_REMOTE_RIGHT = paths.actions.cursor.right.grab;
2726
const DROP_REMOTE_RIGHT = paths.actions.cursor.right.drop;
@@ -88,8 +87,7 @@ function grab(world, userinput, queryHovered, held, grabPath) {
8887
target &&
8988
userinput.get(grabPath) &&
9089
(!isEntityPinned || AFRAME.scenes[0].is("frozen")) &&
91-
hasPermissionToGrab(world, target) &&
92-
!anyEntityWith(world, PenActive)
90+
hasPermissionToGrab(world, target)
9391
) {
9492
if (hasComponent(world, Networked, target)) {
9593
takeOwnership(world, target);
@@ -101,7 +99,7 @@ function grab(world, userinput, queryHovered, held, grabPath) {
10199

102100
function drop(world, userinput, queryHeld, held, dropPath) {
103101
const heldEid = queryHeld(world)[0];
104-
if (heldEid && userinput.get(dropPath) && !anyEntityWith(world, PenActive)) {
102+
if (heldEid && userinput.get(dropPath)) {
105103
// TODO: Drop on ownership lost
106104
removeComponent(world, held, heldEid);
107105

0 commit comments

Comments
 (0)