From a96f2b41fd5d74bbb0e913b04aff1ef0def2d233 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Tue, 31 Oct 2017 14:48:16 +0100 Subject: [PATCH] Update: Custom Code - BK Flame - Before Render (dywmtohrda.js) 496 bytes modified --- dywmtohrda.js | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/dywmtohrda.js b/dywmtohrda.js index 7bb090c..31eb23a 100644 --- a/dywmtohrda.js +++ b/dywmtohrda.js @@ -149,32 +149,13 @@ if (this.spawningBullets === true) { var position = this.camera.position.instance.clone(); var lookAt = this.camera.lookAt.instance.clone(); - - - var direction = lookAt.sub(position).normalize(); - - //direction.add(position); - - var start = position.clone();//direction.clone(); + var start = new THREE.Vector3(0,0,0.5); + start.unproject(this.camera.instance); var end = start.clone().add(direction.clone().multiplyScalar(1000)); - - start.x = 0; - start.y = 0; - start.z = 0.5; - - //start = position.clone().add(direction.clone().negate().multiplyScalar(5)); - - start.unproject(this.camera.instance); - - console.log('start: ', start); console.log('end: ', end); - - //var mInverse = new THREE.Matrix4().getInverse( this.sceneCrosshair.instance.matrixWorld ); - - //position.applyMatrix4( mInverse ); var geometry = new THREE.Geometry(); geometry.vertices.push( @@ -183,13 +164,7 @@ if (this.spawningBullets === true) { ); var line = new THREE.Line( geometry, material ); - - // line.position.set( - // this.camera.position.x, - // this.camera.position.y, - // this.camera.position.z - // ) - + this.scene.instance.add( line ); }