some changes
parent
d5f51b0af8
commit
144d62a8fe
|
@ -421,7 +421,7 @@ GameLib.D3.ComponentVehicleAIObjectAvoidance.prototype.onUpdate = function(
|
||||||
this.debugArrows.avgDirection.vector = this.debugArrows.avgDirection.vector.normalize();
|
this.debugArrows.avgDirection.vector = this.debugArrows.avgDirection.vector.normalize();
|
||||||
// draw the avg move direction
|
// draw the avg move direction
|
||||||
|
|
||||||
if(!this.debugArrows.avgDirection.mesh) {
|
/*if(!this.debugArrows.avgDirection.mesh) {
|
||||||
this.debugArrows.avgDirection.mesh = new THREE.Mesh(
|
this.debugArrows.avgDirection.mesh = new THREE.Mesh(
|
||||||
new THREE.Geometry(),
|
new THREE.Geometry(),
|
||||||
new THREE.MeshBasicMaterial(
|
new THREE.MeshBasicMaterial(
|
||||||
|
@ -437,9 +437,9 @@ GameLib.D3.ComponentVehicleAIObjectAvoidance.prototype.onUpdate = function(
|
||||||
|
|
||||||
if(this.debugArrows.avgDirection.arrow && this.debugArrows.avgDirection.mesh) {
|
if(this.debugArrows.avgDirection.arrow && this.debugArrows.avgDirection.mesh) {
|
||||||
this.debugArrows.avgDirection.mesh.remove(this.debugArrows.avgDirection.arrow);
|
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,
|
this.debugArrows.avgDirection.vector,
|
||||||
|
|
||||||
new THREE.Vector3(
|
new THREE.Vector3(
|
||||||
|
@ -451,12 +451,12 @@ GameLib.D3.ComponentVehicleAIObjectAvoidance.prototype.onUpdate = function(
|
||||||
12,
|
12,
|
||||||
|
|
||||||
this.debugArrows.avgDirection.mesh.material.color
|
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
|
// draw sensors
|
||||||
{
|
/*{
|
||||||
for(var s = 0, l = this.sensors.length; s < l; ++s) {
|
for(var s = 0, l = this.sensors.length; s < l; ++s) {
|
||||||
|
|
||||||
if(!this.debugArrows.sensors[s].mesh) {
|
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);
|
this.debugArrows.sensors[s].mesh.add(this.debugArrows.sensors[s].arrow);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
// . . . . . . . . . . . . correct the path . . . . . . . . . . . . . .
|
// . . . . . . . . . . . . correct the path . . . . . . . . . . . . . .
|
||||||
|
|
|
@ -135,7 +135,7 @@ GameLib.D3.ComponentVehicleAIPathSteering.prototype.onUpdate = function(
|
||||||
this.raycastVehicleComponent.instance.setSteeringValue(steerAngle, 1);
|
this.raycastVehicleComponent.instance.setSteeringValue(steerAngle, 1);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// - - - - - - - - - - - DEBUG ARROW 1 - - - - - - - - -
|
/*// - - - - - - - - - - - DEBUG ARROW 1 - - - - - - - - -
|
||||||
{
|
{
|
||||||
if(!this.debugArrows.v1) {
|
if(!this.debugArrows.v1) {
|
||||||
this.debugArrows.v1 = 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.debugArrows.v2.mesh.add( this.debugArrows.v2.arrow );
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
this.raycastVehicleComponent.instance.applyEngineForce(-3500, 2);
|
this.raycastVehicleComponent.instance.applyEngineForce(-3500, 2);
|
||||||
|
|
Loading…
Reference in New Issue