Melee Hurtbox Module
This code is over 6 months old. The code may have expired and might no longer function.
A module to store Melee Hurtbox data for all heroes. The data will change depending on the player's state (e.g. crouching, as baby D.Va, Echo duplicating etc.).
The player variable array
Event Player.mhb contains the necessary information for the MHB.
Event Player.mhb <float> is the capsule's radius (r)
Event Player.mhb <vec3> is the offset from player position of the lower end-point (A)
Event Player.mhb <vec3> is the offset from player position of the upper end-point (B)
Event Player.mhb <float> is the length of AB (L)
Event Player.mhb[4-7] contains info for switching between the crouched and standing state. When doing so,
Event Player.mhb and
Event Player.mhb will change accordingly.
The entire array will also update for example when D.Va uses her ult, Echo duplicating a hero, or Echo using a D.Va ult.
The code HPYG6 comes with 2 example rules that recreates Quick Melee (sphere-capsule) and Beam (beam-capsule) hitboxes.
The code should be optimized since the MHB is always upright, and with the reduced elements compared to YASRJ. The module occupies 455 elements, 6 rules, 1 global var and 3 player vars. If you only need the module itself, just copy from the Code Snippet section below.