From ca52b9d56aeac30631dc3d88cc2075809f294db3 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Tue, 31 Oct 2017 13:55:07 +0100 Subject: [PATCH] Update: Custom Code - BK Flame - Before Render (dywmtohrda.js) 67 bytes modified --- dywmtohrda.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dywmtohrda.js b/dywmtohrda.js index 500f806..8bb7d2d 100644 --- a/dywmtohrda.js +++ b/dywmtohrda.js @@ -149,7 +149,15 @@ if (this.spawningBullets === true) { var position = this.camera.position.instance.clone(); var lookAt = this.camera.lookAt.instance.clone(); + + var direction = position.sub(lookAt).normalize(); + + var start = direction.clone(); + + var end = direction.clone(); + + end.z -= 1000; console.log(lookAt); @@ -160,8 +168,8 @@ if (this.spawningBullets === true) { var geometry = new THREE.Geometry(); geometry.vertices.push( - direction, - direction.addScalar(500) + start, + end ); var line = new THREE.Line( geometry, material );