Definev
Definev

Reputation: 31

Dynamic hitbox in Flame Engine

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

Gameplay

Upvotes: 2

Views: 1443

Answers (1)

spydon
spydon

Reputation: 11552

You will have to use several RectangleHitboxes (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

Related Questions