mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 09:33:49 +02:00
Add check to see if hudRayPick intersects.
This commit is contained in:
parent
cba6f29f77
commit
ce787d5803
1 changed files with 3 additions and 0 deletions
|
@ -357,11 +357,14 @@ Script.include("/~/system/libraries/controllers.js");
|
|||
};
|
||||
|
||||
this.notPointingAtEntity = function (controllerData) {
|
||||
if (!hudRayPick.intersects) return;
|
||||
|
||||
var intersection = controllerData.rayPicks[this.hand];
|
||||
var entityProperty = Entities.getEntityProperties(intersection.objectID, "type");
|
||||
var entityType = entityProperty.type;
|
||||
var hudRayPick = controllerData.hudRayPicks[this.hand];
|
||||
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