Reputation: 31
I'm making a clone qix game with flame. Currently i don't know how to get dynamic hitbox for the line. How can I detect self collision in Flame?
Original game: https://youtu.be/Wvzyd0OZg1I?t=69
Upvotes: 2
Views: 1443
Reputation: 11552
You will have to use several RectangleHitbox
es (easiest is if they are separate components if you are on v1) that you add to represent the line and then have the "head" as another hitbox (also on a separate component), probably a CircleHitbox
. Then you override onCollisionStart
in the head component and handle your logic in there.
Upvotes: 1