Update: Custom Code - BK Flame - Before Render (dywmtohrda.js) 67 bytes modified

beta.r3js.org
-=yb4f310 2017-10-31 13:55:07 +01:00
parent 60bbffdfae
commit ca52b9d56a
1 changed files with 10 additions and 2 deletions

View File

@ -149,8 +149,16 @@ 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 );