Skip to content

Commit

Permalink
Fix pen VR
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo committed Mar 18, 2024
1 parent bf6ed63 commit 12393a9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/systems/hold-system.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ function grab(world, userinput, queryHovered, held, grabPath) {
target &&
userinput.get(grabPath) &&
(!isEntityPinned || AFRAME.scenes[0].is("frozen")) &&
hasPermissionToGrab(world, target) &&
!anyEntityWith(world, PenActive)
hasPermissionToGrab(world, target)
) {
if (hasComponent(world, Networked, target)) {
takeOwnership(world, target);
Expand All @@ -101,7 +100,7 @@ function grab(world, userinput, queryHovered, held, grabPath) {

function drop(world, userinput, queryHeld, held, dropPath) {
const heldEid = queryHeld(world)[0];
if (heldEid && userinput.get(dropPath) && !anyEntityWith(world, PenActive)) {
if (heldEid && userinput.get(dropPath)) {
// TODO: Drop on ownership lost
removeComponent(world, held, heldEid);

Expand Down

0 comments on commit 12393a9

Please sign in to comment.