This code is not complete, and may not be correct in all situations. But it serves as a solid base.
With this code you can visualise the size of projectiles and hitscan do check how and when something would hit a player. This helps you determine the size of not only the projectile, but also the hitbox of heroes. Supports multiple players at once
A sphere follows the projectile and lands where the projectile hit. All projectiles are sphere and thus we can determine where exactly they hit a heroes hitbox.
- Dummy bots are frozen in place so their idle animation does not mess with the results.
- Up to 10 effects are shown at once, this can be lowered in the Workshop Settings.
- Some additional things are shown as well, such as the radius of a Pharah rocket explosion.
- I plan on adding visualisations for damage fall off as well.
- Heroes with multiple projectiles per shot (eg. Genji and Baptiste) only show the first projectile.
- This is mostly for primary or secondary fire, but also for some abilities (Reinhardt Firestrike).
- By default on the map Workshop Chamber is enabled, but it works on any map.
- Projectiles that are affect by gravity have their gravity disabled.
- Press [Ability 1] + [Interact] to remove all effects created by you.
- Press [Crouch] + [Reload] + [Jump] to change hero.
- Press [Crouch] + [Interact] to spawn a random dummy bot infront of you (max 6).
- Press [Crouch] + [Ultimate] to toggle whether you deal damage.
- Press [Ability 1] + [Ability 2] to show a visualisation of the path the projectile would have taken. Can be buggy because of effects limit.
- Press [Reload] + [Interact] to toggle slow motion.
This code uses data from https://workshop.codes/wiki/articles/projectile+size+of+all+weapons+and+abilities to determine she size of projectiles.
Workshop Settings (Currently not usable in OW2)