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

beta.r3js.org
-=yb4f310 2017-10-31 14:54:20 +01:00
parent 613440bb24
commit 53a8163df7
1 changed files with 13 additions and 0 deletions

View File

@ -169,6 +169,19 @@ if (this.spawningBullets === true) {
this.scene.instance.add( line );
var ray = new THREE.Ray(this.camera.position.instance, start.subSelf(camera.position.instance).normalize());
var intersects = ray.intersectObjects(
GameLib.EntityManager.Instance.queryComponents(GameLib.D3.Mesh).map(
function(mesh){
return mesh.instance;
}
)
);
if (intersects.length > 0) {
console.log('intersected');
}
}
this.spawnBulletTime += data.delta;