-
-
Couldn't load subscription status.
- Fork 624
Description
Discussed in #1437
Originally posted by LifeDrainingCoding September 24, 2025
I'm struggling to change hitboxes after collision events. So here's the example:
public void updateBody() {
((Circle) view.getChildren().getLast()).setRadius(radius.get());
bbox.clearHitBoxes();
hitBox = new HitBox(new Point2D(-radius.get(), -radius.get()),BoundingShape.circle(radius.get()));
bbox.addHitBox(hitBox);
}so view is link of ViewComponent obtained by Entity.getViewComponent() and bbox is link of BoundingBoxComponent obtained by Entity.getBoundingBoxComponent().
So, after changing hitboxes in bounding box component like in example it doesn't changes at all. Even if bboxes is highlighted by debug menu this lines are doesnt match actual bbox. As you can see in screenshot below blue lines is border bounding boxes they clipping through other bounding while shouldn't and these circles aren't stuck and can freely move by just applying some forces. So these circles doesn't changed their bounding boxes after their spawn in the world(While should, but only visually changed). So it can be proved that i saw collisions while it shouldn't be.

The full app code here