reload scene now clears arrows + remove agent
This commit is contained in:
@@ -156,7 +156,13 @@ export class kfArena{
|
||||
|
||||
removeAgent(aid){
|
||||
const obj3d = this.scene.getObjectByName(aid)
|
||||
this.clearHighlight3DObj(obj3d, this.scene)
|
||||
this.scene.remove(obj3d)
|
||||
const arrow3d = this.scene.getObjectByName(`_speed_${aid}`)
|
||||
if(arrow3d) {
|
||||
this.clearHighlight3DObj(arrow3d, this.scene)
|
||||
this.scene.remove(arrow3d)
|
||||
}
|
||||
if(aid in this.agents) delete(this.agents[aid])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user