intersectObjectWithRay method
dynamic
intersectObjectWithRay(
- dynamic object,
- dynamic raycaster,
- dynamic includeInvisible
Implementation
intersectObjectWithRay(object, raycaster, includeInvisible) {
var allIntersections = raycaster.intersectObject(object, true, null);
for (var i = 0; i < allIntersections.length; i++) {
if (allIntersections[i].object.visible || includeInvisible) {
return allIntersections[i];
}
}
return false;
}