repo: janusweb
action: commit
revision: 
path_from: 
revision_from: f1e45a8af274f5d43949c28b9bf5d2c5b8a0c415:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit f1e45a8af274f5d43949c28b9bf5d2c5b8a0c415
Author: James Baicoianu 
Date:   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
index b928f0f277df58e0cb669bfead80f385b3f63db8..
index ..f83ae96155e5ddadeca410c929b6e1381a9b555d 100644
--- 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-----