mirror of
https://github.com/lubosz/overte.git
synced 2025-04-19 00:38:47 +02:00
Merge pull request #12678 from zfox23/RC65.1_editHandleFix
RC65.1: Fix ray cast checks on tablet ID lists in edit.js
This commit is contained in:
commit
c1f087dd81
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 overlayResult = Overlays.findRayIntersection(pickRay, true, getMainTabletIDs());
|
||||
if (overlayResult.intersects) {
|
||||
return null;
|
||||
var tabletIDs = getMainTabletIDs();
|
||||
if (tabletIDs.length > 0) {
|
||||
var overlayResult = Overlays.findRayIntersection(pickRay, true, tabletIDs);
|
||||
if (overlayResult.intersects) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
var entityResult = Entities.findRayIntersection(pickRay, true); // want precision picking
|
||||
|
@ -967,8 +970,13 @@ function mouseReleaseEvent(event) {
|
|||
|
||||
function wasTabletClicked(event) {
|
||||
var rayPick = Camera.computePickRay(event.x, event.y);
|
||||
var result = Overlays.findRayIntersection(rayPick, true, getMainTabletIDs());
|
||||
return result.intersects;
|
||||
var tabletIDs = getMainTabletIDs();
|
||||
if (tabletIDs.length === 0) {
|
||||
return false;
|
||||
} else {
|
||||
var result = Overlays.findRayIntersection(rayPick, true, getMainTabletIDs());
|
||||
return result.intersects;
|
||||
}
|
||||
}
|
||||
|
||||
function mouseClickEvent(event) {
|
||||
|
|
Loading…
Reference in a new issue