Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 170 bytes modified

beta.r3js.org
-=yb4f310 2018-05-21 14:43:16 +02:00
parent 6302f44ddf
commit 09ead277e5
1 changed files with 4 additions and 0 deletions

View File

@ -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,
[