Rework entirely the hitbox system #22
Labels
No labels
0. Imported
1. Bug
1. Clean-up
1. Feature
1. Improvement
2. Deliverable
2. Epic
3. Duplicate
3. Invalid
3. Need investigation
4. Assets
4. Birb Core
4. Debug
4. Dependencies
4. Inputs
4. Lang
4. Scenes
4. Screen
4. World
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: epervier/epervier-old#22
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Before, each actor was one hitbox, and the two were equivalent. It was simple, nice, and worked well.
SO THROW THAT IN THE TRASH AND DO SOMETHING ELSE.
More seriously, this way of doing add some limitation : it made it complicated to handle origin for hitboxes, multiple hitbox, and a lot of stuff really usefull in real games situations.
So, now, how work the new hitbox system ?
There is now an “hitbox” object. Each actor load a mainHitbox as a special hitbox that will handle all its “normal” collision. Other type of hitboxes are loaded into a special list, that can either be generated manually (by adding and removing hitboxes), either by letting it be handled automatically by a file.
Each of its hitboxes are determined by a width, an height and its relative position to the actor x and y.
Fixes #17 #18 #19 and #20
(note : this was a MR before, it have been made a ticket to preserve it)