Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 127 bytes modified
parent
035be51baa
commit
785ba6c835
|
@ -188,7 +188,7 @@ R3.CustomCode.prototype.render = function(delta) {
|
|||
var goalDistanceL = this.goalL.position.distanceTo(ball.mesh.position);
|
||||
var goalDistanceR = this.goalR.position.distanceTo(ball.mesh.position);
|
||||
|
||||
if (goalDistanceL < (this.goalL.geometry.boundingSphere.radius - ball.mesh.geometry.boundingSphere.radius)) {
|
||||
if (goalDistanceL < (this.goalL.geometry.instance.boundingSphere.radius - ball.mesh.geometry.boundingSphere.radius)) {
|
||||
if (ball.scored === false) {
|
||||
console.log('left goal!');
|
||||
ball.scored = true;
|
||||
|
@ -209,7 +209,7 @@ R3.CustomCode.prototype.render = function(delta) {
|
|||
}
|
||||
}
|
||||
|
||||
if (goalDistanceR < (this.goalR.geometry.boundingSphere.radius - ball.mesh.geometry.boundingSphere.radius)) {
|
||||
if (goalDistanceR < (this.goalR.geometry.instance.boundingSphere.radius - ball.mesh.geometry.boundingSphere.radius)) {
|
||||
if (ball.scored === false) {
|
||||
console.log('right goal!');
|
||||
ball.scored = true;
|
||||
|
@ -573,6 +573,9 @@ this.footballPlayer.instance.position.z = this.football.instance.geometry.boundi
|
|||
this.football.instance.position.y = this.ballY;
|
||||
this.football.instance.visible = false;
|
||||
|
||||
this.goalL.geometry.instance.computeBoundingSphere();
|
||||
this.goalR.geometry.instance.computeBoundingSphere();
|
||||
|
||||
R3.Event.Emit(R3.Event.GAME_LOADED);
|
||||
|
||||
//@ sourceURL=entityLoaded.js
|
||||
|
|
Loading…
Reference in New Issue