mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 22:16:58 +02:00
make sure theres something on the blacklist
This commit is contained in:
parent
546e908633
commit
0e30393c81
1 changed files with 5 additions and 6 deletions
|
@ -778,13 +778,12 @@ function MyController(hand) {
|
||||||
|
|
||||||
var intersection;
|
var intersection;
|
||||||
|
|
||||||
if(USE_BLACKLIST===true){
|
if (USE_BLACKLIST === true && blacklist.length !== 0) {
|
||||||
intersection = Entities.findRayIntersection(pickRay, true, [], blacklist);
|
intersection = Entities.findRayIntersection(pickRay, true, [], blacklist);
|
||||||
|
} else {
|
||||||
|
intersection = Entities.findRayIntersection(pickRayBacked, true);
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
intersection = Entities.findRayIntersection(pickRayBacked, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (intersection.intersects) {
|
if (intersection.intersects) {
|
||||||
// the ray is intersecting something we can move.
|
// the ray is intersecting something we can move.
|
||||||
var intersectionDistance = Vec3.distance(pickRay.origin, intersection.intersection);
|
var intersectionDistance = Vec3.distance(pickRay.origin, intersection.intersection);
|
||||||
|
|
Loading…
Reference in a new issue