Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 170 bytes modified
parent
6302f44ddf
commit
09ead277e5
|
@ -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,
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue