mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 02:36:54 +02:00
don't crash if entity vanishes while doing touch test
This commit is contained in:
parent
8a3b233659
commit
c470649076
1 changed files with 24 additions and 23 deletions
|
@ -1589,8 +1589,11 @@ function MyController(hand) {
|
|||
ids.forEach(function(id) {
|
||||
var props = Entities.getEntityProperties(id, ["boundingBox", "name"]);
|
||||
if (props.name === 'pointer') {
|
||||
return;
|
||||
} else if (props.boundingBox) {
|
||||
continue;
|
||||
}
|
||||
if (!props || !props.boundingBox) {
|
||||
continue;
|
||||
}
|
||||
var entityMinPoint = props.boundingBox.brn;
|
||||
var entityMaxPoint = props.boundingBox.tfl;
|
||||
var leftIsTouching = pointInExtents(leftHandPosition, entityMinPoint, entityMaxPoint);
|
||||
|
@ -1612,8 +1615,6 @@ function MyController(hand) {
|
|||
//we are in another state
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue