repo: janusweb action: commit revision: path_from: revision_from: f1e45a8af274f5d43949c28b9bf5d2c5b8a0c415: path_to: revision_to:
commit f1e45a8af274f5d43949c28b9bf5d2c5b8a0c415 Author: James BaicoianuDate: Thu Oct 22 23:11:33 2020 -0700 room.raycast() maxdist and line precision fix diff --git a/scripts/room.js b/scripts/room.js
--- a/scripts/room.js
+++ b/scripts/room.js
@@ -2311,10 +2311,11 @@ elation.require([
var _pos = new THREE.Vector3(),
_dir = new THREE.Vector3(0,0,-1),
_ray = new THREE.Raycaster();
- _ray.linePrecision = 3;
+ _ray.params.Line.threshold = 3;
_ray.params.Points.threshold = 3;
- return function(dir, pos, classname) {
+ return function(dir, pos, classname, maxdist) {
_ray.set(pos, dir);
+ _ray.far = maxdist || Infinity;
var intersections = _ray.intersectObject(this.colliders, true);
var hits = [];
if (classname) {
-----END OF PAGE-----