mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 04:43:31 +02:00
Update edit.js light/particle overlays to be clickable when behind something
This commit is contained in:
parent
c2564800dc
commit
b7783dcffe
1 changed files with 4 additions and 10 deletions
|
@ -594,18 +594,12 @@ function findClickedEntity(event) {
|
|||
|
||||
var result;
|
||||
|
||||
if (!entityResult.intersects && !lightResult.intersects) {
|
||||
return null;
|
||||
} else if (entityResult.intersects && !lightResult.intersects) {
|
||||
result = entityResult;
|
||||
} else if (!entityResult.intersects && lightResult.intersects) {
|
||||
if (lightResult.intersects) {
|
||||
result = lightResult;
|
||||
} else if (entityResult.intersects) {
|
||||
result = entityResult;
|
||||
} else {
|
||||
if (entityResult.distance < lightResult.distance) {
|
||||
result = entityResult;
|
||||
} else {
|
||||
result = lightResult;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!result.accurate) {
|
||||
|
|
Loading…
Reference in a new issue