User:Manta/Hitdetection: Difference between revisions

From Dustloop Wiki
No edit summary
m (Manta moved page User:Manta to User:Manta/Hitdetection without leaving a redirect)
 
(6 intermediate revisions by the same user not shown)
Line 5: Line 5:
Moves can be designed to hit opponents or not based on whether they're standing, crouching, airborne, downed, in hitstun etc... These tend to be found on moves that are unblockable in some way to allow the opponent to defend against them. Most common by far is that grounded throw moves cannot hit someone airborne (or even while starting to jump) and likewise airthrows can only hit players in the air:
Moves can be designed to hit opponents or not based on whether they're standing, crouching, airborne, downed, in hitstun etc... These tend to be found on moves that are unblockable in some way to allow the opponent to defend against them. Most common by far is that grounded throw moves cannot hit someone airborne (or even while starting to jump) and likewise airthrows can only hit players in the air:


<some examples of hitboxes matching but the move failing>
<gallery heights=300px widths=600px caption="">
HitboxFailstoHitCrouching.png|Hitboxes clearly overlap, but this attack isn't allowed to hit crouching targets!
</gallery>


=== Range check ===
=== Range check ===
You will have noticed that opponents have a minimum distance they can stand from each other, and that trying to move closer just pushes the other player back instead. This is not a feature of the hitboxes described above, but a separate and much more simple system called a collision box:
You will have noticed that opponents have a minimum distance they can stand from each other, and that trying to move closer just pushes the other player back instead. This is not a feature of the hitboxes described above, but a separate and much more simple system called a collision box:


<some examples of collision boxes, including one of a collision box being pushed forward by a move>
<gallery heights=300px widths=400px caption="">
CollisionBox.png|Collision boxes look like this, they're usually the same size for every character and centred on the origin (Orange Cross)
PushedCollisionbox.png|But some moves can displace it from the origin, others might also change its dimensions entirely.
</gallery>


This is what ArcSys games use to check the distance between players when doing throws and similar moves, to avoid strange looking situations where a player gets thrown from half a screen away. So even if the hitbox for a throw looks enormous in some cases, they're often much more limited by this range check.
This is what ArcSys games use to check the distance between players when doing throws and similar moves, to avoid strange looking situations where a player gets thrown from half a screen away. So even if the hitbox for a throw looks enormous in some cases, they're often much more limited by this range check:
<gallery heights=300px widths=400px caption="">
ThrowRange1.png|Hitboxes clearly overlap...
ThrowRange2.png|But their collision boxes are no-where near, so the throw misses
</gallery>
 
Be aware that while some moves might allow you to pass through the opponent by disabling collision, the collision box still exists, you still might be able to get thrown!


=== Vector Check ===
=== Vector Check ===
A final check added to some moves is a check on the actual direction and vector between both player's origin points, which checks if the target is in front or behind and above or below the attacker, and by how much. Most of the time this check will not be noticed by a player; It is mostly used to make sure moves like throws don't sometimes hit an opponent ''behind'' the attacker:
A final check added to some moves is a check on the actual direction and vector between both player's origin points, which checks if the target is in front or behind and above or below the attacker, and by how much. Most of the time this check will not be noticed by a player; It is mostly used to make sure moves like throws don't sometimes hit an opponent ''behind'' the attacker:
 
<gallery heights=300px widths=600px caption="">
<some examples throws that fail because of being behind the attacker>
WrongSideHitDetection.png|They're close enough and the hitboxes overlap, but Tager's facing the wrong way! The throw misses and Tager just gets hit
</gallery>

Latest revision as of 12:51, 15 August 2022

Other Checks

Hitboxes are not the whole story. Many moves, particularly throws (but not exclusively), also layer in up to three further checks:

State Check

Moves can be designed to hit opponents or not based on whether they're standing, crouching, airborne, downed, in hitstun etc... These tend to be found on moves that are unblockable in some way to allow the opponent to defend against them. Most common by far is that grounded throw moves cannot hit someone airborne (or even while starting to jump) and likewise airthrows can only hit players in the air:

Range check

You will have noticed that opponents have a minimum distance they can stand from each other, and that trying to move closer just pushes the other player back instead. This is not a feature of the hitboxes described above, but a separate and much more simple system called a collision box:

This is what ArcSys games use to check the distance between players when doing throws and similar moves, to avoid strange looking situations where a player gets thrown from half a screen away. So even if the hitbox for a throw looks enormous in some cases, they're often much more limited by this range check:

Be aware that while some moves might allow you to pass through the opponent by disabling collision, the collision box still exists, you still might be able to get thrown!

Vector Check

A final check added to some moves is a check on the actual direction and vector between both player's origin points, which checks if the target is in front or behind and above or below the attacker, and by how much. Most of the time this check will not be noticed by a player; It is mostly used to make sure moves like throws don't sometimes hit an opponent behind the attacker: