From 9451a1261e586aba990b2addb839381645eddd1c Mon Sep 17 00:00:00 2001 From: ksuprynowicz Date: Sun, 10 Dec 2023 12:51:08 +0100 Subject: [PATCH] Fix a bug with grabbable entities --- .../controllers/controllerModules/nearParentGrabOverlay.js | 2 +- .../controllers/controllerModules/webSurfaceLaserInput.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/system/controllers/controllerModules/nearParentGrabOverlay.js b/scripts/system/controllers/controllerModules/nearParentGrabOverlay.js index e0660df1b7..cb071c2dbd 100644 --- a/scripts/system/controllers/controllerModules/nearParentGrabOverlay.js +++ b/scripts/system/controllers/controllerModules/nearParentGrabOverlay.js @@ -203,7 +203,7 @@ Script.include("/~/system/libraries/utils.js"); var candidateOverlays = controllerData.nearbyOverlayIDs[this.hand]; var grabbableOverlays = candidateOverlays.filter(function(overlayID) { // V8TODO: check if this works - return Entities.getEntityProperties(overlayID, ["grab"]).grab.grabbable; + return Entities.getEntityProperties(overlayID, ["grab.grabbable"]).grab.grabbable; }); var targetID = this.getTargetID(grabbableOverlays, controllerData); diff --git a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js index 4368a42df4..e5cccaf047 100644 --- a/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js +++ b/scripts/system/controllers/controllerModules/webSurfaceLaserInput.js @@ -59,7 +59,7 @@ Script.include("/~/system/libraries/controllers.js"); var candidateOverlays = controllerData.nearbyOverlayIDs[this.hand]; var grabbableOverlays = candidateOverlays.filter(function(overlayID) { //V8TODO: this needs to be checked if it works - return Entities.getEntityProperties(overlayID, ["grab"]).grab.grabbable; + return Entities.getEntityProperties(overlayID, ["grab.grabbable"]).grab.grabbable; }); var target = nearGrabModule.getTargetID(grabbableOverlays, controllerData); if (target) {