Draw line in direction of raycaster in three.js
<p>In three.js, I'm using PointerLock controls the make a basic first person shooter.
I use</p>

<pre><code>function onDocumentMouseDown( event ) {
  var raycaster = new THREE.Raycaster();
  mouse3D.normalize();
  controls.getDirection( mouse3D );
  raycaster.set( controls.getObject().position, mouse3D );
  var intersects = raycaster.intersectObjects( objects );
  ...
}
</code></pre>

<p>to detect a collision with an object, which means you "shot" the object.</p>

<p>Now, I want to visualize the path the bullet took. I was thinking about drawing a line from where the user is looking to, in direction of the raycaster, but I can't figure out how to do this... Anyone who can help me? I'm new to three.js, never thought drawing a line would be this hard.</p>

<p><strong>Update:</strong>
I'm trying to draw a line using:</p>

<pre><code>var geometry = new THREE.Geometry();
geometry.vertices.push(...);
geometry.vertices.push(...);
var line = new THREE.Line(geometry, material);
scene.add(line);
</code></pre>

<p>but I can't figure out what to put in place of the "..." . How can I detect which point the line should go to? And how to determine which point it starts from? The player is able to move and even jump so the starting point is always different too.</p>