diff options
| author | Julie Lala <jules@okfoc.us> | 2014-10-31 22:38:27 -0400 |
|---|---|---|
| committer | Julie Lala <jules@okfoc.us> | 2014-10-31 22:38:27 -0400 |
| commit | a61ad3cea5b7a76777d594d1a6d960943a0e776f (patch) | |
| tree | 404981bc53e3101ed6081fad3326de5036fb2a56 /public/assets/test/intersect3.html | |
| parent | dc4db9d58f9868694d71b697e5351596cadc4054 (diff) | |
correctly intercepting walls in mover
Diffstat (limited to 'public/assets/test/intersect3.html')
| -rw-r--r-- | public/assets/test/intersect3.html | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/public/assets/test/intersect3.html b/public/assets/test/intersect3.html index e897e8a..1e2a1a4 100644 --- a/public/assets/test/intersect3.html +++ b/public/assets/test/intersect3.html @@ -167,12 +167,12 @@ function draw () { } drawPoint(intersect) - if (actually_intersects && intersecting_face && t < min_t) { + if (actually_intersects && t < min_t) { min_t = t hud.innerHTML += t + "<br>" var clone = intersect.clone() clone.t = t - closest_face = intersecting_face + closest_intersect = intersecting_face closest_intersect = clone } }) @@ -185,12 +185,6 @@ function draw () { ctx.fillStyle = "#00f" drawPoint(closest_intersect) drawLine(cursor.x, closest_intersect, "#00f") - // closest_face.vec - - // get the closest intersect, i.e. the one with smallest t value - // get the angle of the cursor - // move the desired position to pos - 20px - } } function drawLine (pa, pb, color, headless) { |
