https://imgur.com/I4nwn47
Hello,
As you can see in the video above I encountered issues with collisions between events.
Steps to reproduce:
Call moveTo on multiple events. I do it when a collision with a moving hitbox is detected by:
victim.breakRoutes(true);
victim.stopMoveTo();
victim.moveTo(attacker).subscribe();
Moving hitbox:
this.player.getCurrentMap()?.createMovingHitbox(
[
{ x: this.getPositionX(), y: this.getPositionY(), width: HITBOX.x, height: HITBOX.y },
]
).subscribe({
next(hitbox) {
var otherPlayersCollision = that.excludePlayer(hitbox.otherPlayersCollision as RpgPlayer[]);
otherPlayersCollision.forEach((player: RpgPlayer) => {
FollowPlayer.onHit(player, that.player);
TakeDamage.onHit(player, that.player);
})
},
})
Then just move around.
And as you can see after a few moments events stop to collide among them.
Issue 1. I can go through these events.
Issue 2: hitbox does not have an impact on them because it does not decrease their HP.