mirror of
https://github.com/overte-org/overte.git
synced 2025-07-24 21:25:31 +02:00
fix list of tablet IDs ray cast checks in edit.js
This commit is contained in:
parent
0934a7d467
commit
3f2a49d243
1 changed files with 13 additions and 5 deletions
|
@ -776,9 +776,12 @@ function findClickedEntity(event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var pickRay = Camera.computePickRay(event.x, event.y);
|
var pickRay = Camera.computePickRay(event.x, event.y);
|
||||||
var overlayResult = Overlays.findRayIntersection(pickRay, true, getMainTabletIDs());
|
var tabletIDs = getMainTabletIDs();
|
||||||
if (overlayResult.intersects) {
|
if (tabletIDs.length > 0) {
|
||||||
return null;
|
var overlayResult = Overlays.findRayIntersection(pickRay, true, tabletIDs);
|
||||||
|
if (overlayResult.intersects) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var entityResult = Entities.findRayIntersection(pickRay, true); // want precision picking
|
var entityResult = Entities.findRayIntersection(pickRay, true); // want precision picking
|
||||||
|
@ -967,8 +970,13 @@ function mouseReleaseEvent(event) {
|
||||||
|
|
||||||
function wasTabletClicked(event) {
|
function wasTabletClicked(event) {
|
||||||
var rayPick = Camera.computePickRay(event.x, event.y);
|
var rayPick = Camera.computePickRay(event.x, event.y);
|
||||||
var result = Overlays.findRayIntersection(rayPick, true, getMainTabletIDs());
|
var tabletIDs = getMainTabletIDs();
|
||||||
return result.intersects;
|
if (tabletIDs.length === 0) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
var result = Overlays.findRayIntersection(rayPick, true, getMainTabletIDs());
|
||||||
|
return result.intersects;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function mouseClickEvent(event) {
|
function mouseClickEvent(event) {
|
||||||
|
|
Loading…
Reference in a new issue