Login
Create
pluzorminuz

Melee Hurtbox Module

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[0] <float> is the capsule's radius (r)
Event Player.mhb[1] <vec3> is the offset from player position of the lower end-point (A)
Event Player.mhb[2] <vec3> is the offset from player position of the upper end-point (B)
Event Player.mhb[3] <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[2] and Event Player.mhb[3] 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.

Categories: Miscellaneous
Heroes: All
Created At:
Updated At:
Version: 1.0.0

Snippet

Loading...

Similar Codes

Elo Hell Logo_H-M-Dark
Join the Elo Hell Workshops Discord
Workshop.codes - Background image