diff --git a/dywmtohrda.js b/dywmtohrda.js index 11a2e1a..7164061 100644 --- a/dywmtohrda.js +++ b/dywmtohrda.js @@ -149,18 +149,19 @@ if (this.spawningBullets === true) { var position = this.camera.position.instance.clone(); var lookAt = this.camera.lookAt.instance.clone(); - var mInverse = new THREE.Matrix4().getInverse( this.sceneCrosshair.instance.matrixWorld ); + var direction = position.subtract(lookAt); - position.applyMatrix4( mInverse ); + + + + //var mInverse = new THREE.Matrix4().getInverse( this.sceneCrosshair.instance.matrixWorld ); + + //position.applyMatrix4( mInverse ); var geometry = new THREE.Geometry(); geometry.vertices.push( - new THREE.Vector3( - position.x + 10, - position.y, - position.z - ), - lookAt + direction.add(200), + direction.subtract(200) ); var line = new THREE.Line( geometry, material );