function checkHit(bullet, b){
for(var i = collidableMeshList.length-1 ; i>=0; i--){
var collideMesh = collidableMeshList[i];
var v = collideMesh.geometry.vertices[0];
var c = collideMesh.position;
var x = Math.abs(v.x), z = Math.abs(v.z);
if(bullet.x < c.x + x && bullet.x > c.x - x && bullet.z < c.z + z && bullet.z > c.z - z){
scene.remove(b); // Removing Bullet After Hitting
scene.remove(collideMesh); // Removing After hit By Bullet
delete collidableMeshList[index]; // deleting that Index on which the Mesh is Placed
return true;
}
}
return false;
}
我想问一下如何从已删除和删除的地方删除射线效果或物体效果,因为即使我删除对象或将其从场景中删除,我也无法将我的汽车从该地方移开