[Bug]: When adding multiple HitBoxes, the second and subsequent tests are incorrect
Closed this issue · 3 comments
nyuntaka commented
What happened?
When adding multiple HitBoxes, the second and subsequent tests are incorrect. I think this is a bug.
Steps to reproduce?
CollisionMapComponent collis = CollisionMapComponent(
position: Vector2.zero(),
size: Vector2.zero(),
collisions: [
RectangleHitbox(
position: Vector2.all(200),
size: Vector2.all(100),
),
RectangleHitbox(
position: Vector2.all(300),
size: Vector2.all(100),
),
CircleHitbox(
radius: 50,
position: Vector2.all(400),
)
],
);
return LayoutBuilder(
builder: (context, constraints) {
return BonfireWidget(
components: [collis],
showCollisionArea: true,
...
This bug also occurs with GameComponent other than CollisionMapComponent.
What did you expect to happen?
I think the second and subsequent ones should have the same result as the first.
Bonfire version
3.8.5
Relevant log output
No response
RafaelBarbosatec commented
Hi @nyuntaka !
Thanks for this issue.
In the moment I consider only the first hotbox to handle collision. I will try improve this point.
Thank you!
nyuntaka commented
Until then, I will instead use multiple GameDecorations with one HitBox added.
Thank you.
nyuntaka commented
I was able to confirm that it was fixed.
thank you very much.