So I tried all of those with no luck
- Wall collider with all zombie groups, are defined last in my
BotSystem
file
{ // ------- NORMAL ZOMBIES
this.botGroup = this.scene.add.existing(
new Bots(this.nengiInstance, this.onBotDeathCallback, this.onBotDamageCallback, navMesh, this.playerSystem, ZombieTypes.STANDARD_ZOMBIE, this.scene.physics.world, this.scene, { name: ZombieTypes.STANDARD_ZOMBIE })
) as unknown as Bots;
this.botGroup.createMultiple({
key: "zombie",
quantity: config.zombies[ZombieTypes.STANDARD_ZOMBIE].maxCount,
active: false,
visible: false
});
this.scene.physics.add.collider(this.botGroup, this.worldLayer, (bot: BotSprite, enemy: any) => {
// NO LOGIC FOR NOW
});
this.scene.physics.add.collider(this.botGroup, this.botGroup, (bot: BotSprite, enemy: any) => {
// NO LOGIC FOR NOW
});
}
{ // ------- FAST ZOMBIES
this.fastZombieBotGroup = this.scene.add.existing(
new Bots(this.nengiInstance, this.onBotDeathCallback, this.onBotDamageCallback, navMesh, this.playerSystem, ZombieTypes.FAST_ZOMBIE, this.scene.physics.world, this.scene, { name: ZombieTypes.FAST_ZOMBIE })
) as unknown as Bots;
this.fastZombieBotGroup.createMultiple({
key: ZombieTypes.FAST_ZOMBIE,
quantity: config.zombies[ZombieTypes.FAST_ZOMBIE].maxCount,
active: false,
visible: false
});
this.scene.physics.add.collider(this.fastZombieBotGroup, this.worldLayer, (bot: BotSprite, enemy: any) => {
// NO LOGIC FOR NOW
});
this.scene.physics.add.collider(this.fastZombieBotGroup, this.fastZombieBotGroup, (bot: BotSprite, enemy: any) => {
// NO LOGIC FOR NOW
});
}
{ // ------- HELL ZOMBIES
const navMeshHellZombies: NavMesh = new NavMesh(navMeshPolygonPoints, 32);
this.hellZombieGroup = this.scene.add.existing(
new HellZombieGroup(this.nengiInstance, this.onBotDeathCallback, this.onBotDamageCallback, navMeshHellZombies, this.scene.physics.world, this.scene, this.worldLayer, { name: ZombieTypes.HELL_ZOMBIE })
) as unknown as HellZombieGroup;
this.hellZombieGroup.createMultiple({
key: ZombieTypes.HELL_ZOMBIE,
quantity: config.zombies[ZombieTypes.HELL_ZOMBIE].maxCount,
active: false,
visible: false
});
this.scene.physics.add.collider(this.hellZombieGroup, this.worldLayer, (bot: BotSprite, enemy: any) => {
// NO LOGIC FOR NOW
});
this.scene.physics.add.collider(this.hellZombieGroup, this.hellZombieGroup, (bot: BotSprite, enemy: any) => {
// NO LOGIC FOR NOW
});
}
this.scene.physics.add.collider(this.buildSystem.buildingBlockLowWallsGroup, [this.botGroup, this.hellZombieGroup, this.fastZombieBotGroup], (buildingBlock: BuildingBlockWallSprite, bot: BotSprite) => {
// logger.debug("Bot hit wall");
buildingBlock.takeDamage();
});
- I converted my
Bot
sprite to use update
by adding this.runChildUpdate = true;
to the group constructor, same behaviour still though
- Increasing
overlapBias
results in the zombies jumping around and through each other and through collideables even more
- Tried up to 250 FPS, with no difference