Files
flame/examples/lib/stories/collision_detection
Lukas Klingsbo 637c258b25 feat: Change HasCollisionDetection to be on Component (#2404)
This change makes it possible to have the collision detection system further down in the tree than on the FlameGame, this enables you to have collision detection on the World component for example.
Today it doesn't work if you have several worlds where the components are overlapping across the worlds, since the hitboxes live on top level.

So now you can use a World like this:

class CollisionDetectionWorld extends World with HasCollisionDetection {}
and all hitboxes added in there will only react with other hitboxes added to that world.
2023-03-15 13:11:23 +01:00
..