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 );