Update: Custom Code - BK Flame - Before Render (dywmtohrda.js) 359 bytes modified
parent
613440bb24
commit
53a8163df7
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue