- Home /
Best way to handle 2d hitboxes for combat system
Hello, everyone! I've hit a snag on deciding how to implement the hitbox side of my game... I currently have an animation system that is working quite well, with a couple of different weapons, and combos (3-hit combos). This is a 2d platformer. My question is... what would be the best / most efficient way to handle hitboxes?
For example... I have one weapon which is Fists, that Fists has 3 attack animations, jab left, jab right then uppercut. I know I could create child gameobjects and each have their own separate colliders and then turn them off / on depending on which attack is playing... or, I could just have one collider and animate it based on the animation that is playing... How did you guys implement it in your game and what did you find worked best?
Thanks!
Answer by Harambe_Reborn · Aug 15, 2019 at 03:05 PM
You could try raycasting towards your fist, then you don't need to animate any collider.
Your answer
Follow this Question
Related Questions
How do I know when an object is going under a Platform Effector 2D object? 0 Answers
Animation Coordinates Issue 0 Answers
Animation on public transform from script 2D 0 Answers
"Double transform" on 2D hitboxes when root motion is enabled 0 Answers
2D elevator with animation doesn't start 0 Answers