mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 06:23:35 +02:00
Merge pull request #1380 from Armored-Dragon/fix/controller-scripts-1376
Fix breakage in controller scripts relating to hudRayPicks
This commit is contained in:
commit
a37811cbbb
1 changed files with 3 additions and 0 deletions
|
@ -357,11 +357,14 @@ Script.include("/~/system/libraries/controllers.js");
|
|||
};
|
||||
|
||||
this.notPointingAtEntity = function (controllerData) {
|
||||
|
||||
var intersection = controllerData.rayPicks[this.hand];
|
||||
var entityProperty = Entities.getEntityProperties(intersection.objectID, "type");
|
||||
var entityType = entityProperty.type;
|
||||
var hudRayPick = controllerData.hudRayPicks[this.hand];
|
||||
if (!hudRayPick.intersects) return false;
|
||||
var point2d = this.calculateNewReticlePosition(hudRayPick.intersection);
|
||||
|
||||
if ((intersection.type === Picks.INTERSECTED_ENTITY && entityType === "Web") ||
|
||||
intersection.type === Picks.INTERSECTED_OVERLAY || Window.isPointOnDesktopWindow(point2d)) {
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue