diff --git a/ff0fsum4zx.js b/ff0fsum4zx.js index f3053f1..954c79d 100644 --- a/ff0fsum4zx.js +++ b/ff0fsum4zx.js @@ -170,6 +170,7 @@ R3.CustomCode.prototype.render = function(delta) { ball.mesh.position.z > -5 ) { + console.warn('check for collision'); this.raycaster.set(ball.mesh.position, direction); this.raycaster.intersectObjects([ this.goalWithHoles.instance @@ -195,6 +196,7 @@ R3.CustomCode.prototype.render = function(delta) { ball.upAngle *= ball.bounciness; ball.speed *= ball.bounciness * 1.5; ball.t = 0; + console.log('collision', reflect); ball.v.copy(direction); @@ -286,6 +288,8 @@ R3.CustomCode.prototype.move = function(data) { if (this.canKick && this.activeBall === null) { + console.log('can kick - creating new ball'); + this.activeBall = new THREE.Mesh( this.ballGeometry.instance, [