From 144d62a8fe0450703120585f3195ef20c1cf0a0f Mon Sep 17 00:00:00 2001 From: polygonboutique Date: Fri, 18 Nov 2016 10:50:19 +0100 Subject: [PATCH] some changes --- ...me-lib-component-vehicle-ai-object-avoidance.js | 14 +++++++------- src/game-lib-component-vehicle-ai-path-steering.js | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/game-lib-component-vehicle-ai-object-avoidance.js b/src/game-lib-component-vehicle-ai-object-avoidance.js index 473f709..112965f 100644 --- a/src/game-lib-component-vehicle-ai-object-avoidance.js +++ b/src/game-lib-component-vehicle-ai-object-avoidance.js @@ -421,7 +421,7 @@ GameLib.D3.ComponentVehicleAIObjectAvoidance.prototype.onUpdate = function( this.debugArrows.avgDirection.vector = this.debugArrows.avgDirection.vector.normalize(); // draw the avg move direction - if(!this.debugArrows.avgDirection.mesh) { + /*if(!this.debugArrows.avgDirection.mesh) { this.debugArrows.avgDirection.mesh = new THREE.Mesh( new THREE.Geometry(), new THREE.MeshBasicMaterial( @@ -437,9 +437,9 @@ GameLib.D3.ComponentVehicleAIObjectAvoidance.prototype.onUpdate = function( if(this.debugArrows.avgDirection.arrow && this.debugArrows.avgDirection.mesh) { this.debugArrows.avgDirection.mesh.remove(this.debugArrows.avgDirection.arrow); - } + }*/ - this.debugArrows.avgDirection.arrow = new THREE.ArrowHelper( + /*this.debugArrows.avgDirection.arrow = new THREE.ArrowHelper( this.debugArrows.avgDirection.vector, new THREE.Vector3( @@ -451,12 +451,12 @@ GameLib.D3.ComponentVehicleAIObjectAvoidance.prototype.onUpdate = function( 12, this.debugArrows.avgDirection.mesh.material.color - ); + );*/ - this.debugArrows.avgDirection.mesh.add(this.debugArrows.avgDirection.arrow); + //this.debugArrows.avgDirection.mesh.add(this.debugArrows.avgDirection.arrow); // draw sensors - { + /*{ for(var s = 0, l = this.sensors.length; s < l; ++s) { if(!this.debugArrows.sensors[s].mesh) { @@ -519,7 +519,7 @@ GameLib.D3.ComponentVehicleAIObjectAvoidance.prototype.onUpdate = function( this.debugArrows.sensors[s].mesh.add(this.debugArrows.sensors[s].arrow); } - } + }*/ // . . . . . . . . . . . . correct the path . . . . . . . . . . . . . . diff --git a/src/game-lib-component-vehicle-ai-path-steering.js b/src/game-lib-component-vehicle-ai-path-steering.js index 095b02b..5e3e341 100644 --- a/src/game-lib-component-vehicle-ai-path-steering.js +++ b/src/game-lib-component-vehicle-ai-path-steering.js @@ -135,7 +135,7 @@ GameLib.D3.ComponentVehicleAIPathSteering.prototype.onUpdate = function( this.raycastVehicleComponent.instance.setSteeringValue(steerAngle, 1); //} - // - - - - - - - - - - - DEBUG ARROW 1 - - - - - - - - - + /*// - - - - - - - - - - - DEBUG ARROW 1 - - - - - - - - - { if(!this.debugArrows.v1) { this.debugArrows.v1 = this.debugArrows.v1 || {}; @@ -234,7 +234,7 @@ GameLib.D3.ComponentVehicleAIPathSteering.prototype.onUpdate = function( ); this.debugArrows.v2.mesh.add( this.debugArrows.v2.arrow ); - } + }*/ } this.raycastVehicleComponent.instance.applyEngineForce(-3500, 2);