The launcher will be an arrow that points in the direction we want to launch the ball. Add the launcher arrow code just below the line with START CODING ON THE NEXT LINE.
|||var direction = new THREE.Vector3(0, 1, 0);|
|||var position = new THREE.Vector3(0, -100, 250);|
|||var length = 100;|
|||this.arrow = new THREE.ArrowHelper(|
We use an “arrow helper” to draw our launcher. We might replace it with an animated slingshot or something similar later, but an arrow will be just fine for our mini-game. The arrow needs a direction to point in (straight up), a position (a little down and a little back from center), a length, and a color. With those values, ...