Unit Size is a mechanic that defines a unit's size in the game.
Definition[]
Only Selection Size can change as Model Size changes. Other unit sizes do not have relationship with each other.
Unit sizes are not directly set by a number in their data. Instead, sizes are standardized for all units, with the use of collision sizes and bound radius.
Mechanics | Definition | Console | Example |
---|---|---|---|
Collision Size | dota_unit_show_collision_radius 1
|
||
Bound Radius |
|
dota_unit_show_bounding_radius 1
|
|
Selection Box |
|
dota_unit_show_selection_boxes 1
|
|
Model Size |
|
ent_hitbox
|
Size Values[]
The Collision Sizes and Bound Radius of units are not directly set by a number in their data. Instead, they are standardized for all units with the following hull sizes.
Hull Name | Collision Size | Bound Radius | Notes |
---|---|---|---|
DOTA_HULL_SIZE_BUILDING
|
x
|
x-16
|
|
DOTA_HULL_SIZE_BARRACKS
|
160 | 144 |
|
DOTA_HULL_SIZE_TOWER
|
144 | 144 | |
DOTA_HULL_SIZE_FILLER
|
112 | 96 | |
DOTA_HULL_SIZE_HUGE
|
80 | 80 |
|
DOTA_HULL_SIZE_BIG_HERO
|
43 | 40 | |
DOTA_HULL_SIZE_LARGE
|
41 | 40 | |
DOTA_HULL_SIZE_SIEGE
|
40 | 16 |
|
DOTA_HULL_SIZE_REGULAR
|
36 | 16 | |
DOTA_HULL_SIZE_HERO
|
27 | 24 | |
DOTA_HULL_SIZE_SMALL
|
18 | 8 | |
DOTA_HULL_SIZE_SMALLEST
|
4 | 2 |
Ancients[]
Both Radiant and Dire's Ancient uses the DOTA_HULL_SIZE_BUILDING
. Their exact collision size and bound radius can be found in models/props_structures
.
Faction | Model | Collision Size | Bound Radius |
---|---|---|---|
Radiant | radiant_ancient001.vmdl_c
|
314.73 | 298.73 |
Dire | dire_ancient_base001.vmdl_c
|
389.96 | 373.96 |
Heroes[]
Heroes | Collision Size | Bound Radius |
---|---|---|
27 | 24 | |
18 | 8 |
Units[]
Collision Size[]
Collision Size is a unit's internal size that cannot be passed through by other units, while phased movement allows units to ignore collision size and pass through other units. A unit's collision size can be shown with dota_unit_show_collision_radius 1
with console enabled.
A unit's collision size is not directly affected by its model size or graphical model. Generally, collision size refers to the smallest possible distance between two units. Therefore, the smallest possible distance between two units is equal to the sum of the collision size of the units.
Collision size causes units to block each other with their bodies, and block units during pathfinding. Non-player-controlled units (i.e. lane creeps) do not try to path around the source that blocks them but simply walk against it as if it is not there. This effectively causes them to get stuck, until they change directions (e.g. when being aggro'd), or until the source that blocks them disappears.
Units with phased movement ignore the collision sizes of other units, causing both units to overlap. When multiple units overlap during the phase movement expiring, the units with lower collision size priority will be pushed away from the higher-priority collision size source as follows:
Priority | Definition | Examples |
---|---|---|
1 | Immoveable Objects |
|
2 | The unit that loses phased movement first. |
|
Collision size also affects illusion-creating sources. Since two heroes (or units) cannot be in the same coordinates without phased movement, and they will be pushed 58-distance away upon losing phased movement, regardless of the collision sizes. In the following table, Phantom Lancer and Chaos Knight have a collision size of 18 and 27 respectively. The illusions will spawn at different distances depending on the affected target's collision size as follows:
- Example
- Chaos Knight casts Chaos Bolt on an enemy Marci and Siege Creep. How far the Phantasm illusion will be spawned next to both of these enemy targets?
- Chaos Knight Collision Size: 27
- Marci Collision Size: 27
- Siege Creep Collision Size: 40
- Since both heroes' collision sizes are the same, the Phantasm illusion will spawn 58-distance away when Marci does not have phased movement.
- For the Siege Creep, the Phantasm illusion will spawn 87-distance away instead.
Pathing Blocker[]
A pathing blocker is an invisible entity with a collision size that physically blocks other units. Walking against a pathing blocker is akin to walking against any other unit that is not phased or flying, or walking against trees.
Phased movement does not allow a unit to path through pathing blockers, but flying or unobstructed movement does. Lane creeps cannot walk around pathing blockers and try to walk through them, effectively getting fully stopped by them. Player-controlled units try to path around them if possible.
These pathing blockers (npc_dota_thinker
) created are generally not selectable.
The smallest distance between a pathing blocker and another unit depends on both entities' bound radius, not collision size. For example, the smallest distance between Marci and a Cycloned unit's center will be the sum of both entities' bound radius, which will be 48.
The picture on the right shows the Defender's Gate utilizing the collision size mechanic as a pathing blocker visualized.
- 1 Requires talent.
- 2a Requires Aghanim's Scepter.
- 2b Requires Aghanim's Shard.
Trees[]
are a prominent terrain feature in Dota 2. They make up a large amount of the map and are very prominent in the forests that separate the lanes and border the map. block vision and are normally impassable.
Despite the varying appearance and apparent size of the various , all permanent have an block size of a x unit square.
Ignoring Collision Size[]
Phased is a status that allows units to pass through other units, ignoring collision size. Phased units can freely walk through any other unit, including wards, but excluding buildings and trees. Other units can also walk through a stationary phased unit as if it is not there.
There are two different kinds of phased movement, pathing through units, and the rare kind which allows the unit to walk through anything, including buildings, cliffs and trees, which is more commonly referred to as unobstructed movement.
Certain abilities grant tree-walking, a buff that allows unobstructed movement through trees. All flying and unobstructed movement sources grant tree-walking as well.
Phased Movement[]
These abilities provide phased movement which allows moving through units:
- Bounty Hunter – Shadow Walk
- Bounty Hunter – Friendly Shadow
- Clinkz – Skeleton Walk
- Dark Willow – Shadow Realm
- Faceless Void – Chronosphere
- Glimmer Cape – Glimmer
- Invoker – Ghost Walk
- Nyx Assassin – Vendetta
- Phase Boots – Phase
- Shadow Amulet – Fade
- Slardar – Guardian Sprint
- Shadow Blade – Shadow Walk
- Shadow Fiend – Requiem of Souls (Cast Time)
- Silver Edge – Shadow Walk
- Slardar – Guardian Sprint
- Storm – Wind Walk
- Templar Assassin – Meld
- Weaver – Shukuchi
- 1 Requires talent.
- 2a Requires Aghanim's Scepter.
- 2b Requires Aghanim's Shard.
The following units are permanently phased:
- Anti-Mage – Blink Fragment Illusion
- Spin Web – Phased
- Courier – Phased
- Beetle – Phased
- Hawk – Phased
- Fire – Permanent Phase
- Hoodwink – Decoy Illusion
- Observer Ward – Phased
- Sentry Ward – Phased
- Healing Ward – Phased
- Ignis Fatuus – Phased
- Phoenix Sun – Phased
- Proximity Mines – Phased
- Minefield Sign – Phased
- Roshan – Strength of the Immortal
- Psionic Trap – Phased
- 1 Requires talent.
- 2a Requires Aghanim's Scepter.
- 2b Requires Aghanim's Shard.
Unobstructed Movement[]
Free pathing (also known as unobstructed movement) allows affected units to path through buildings, cliffs and trees, on top of allowing them to path through other units. There is no limit to their movement and only a tiny amount of spells will block them. All sources of flying movement give units unobstructed movement. Uphill miss chance does not apply to flying units.
The following abilities provide unobstructed movement:
- Batrider – Firefly
- Broodmother – Spin Web
- Centaur Warrunner – Stampede2a
- Dragon Knight – Black Dragon Form2a
- Earthshaker – Fissure2b
- Giant's Ring – Giant's Foot
- Hoodwink – Decoy Illusion
- Lich – Sinister Gaze
- Legion Commander – Duel
- Nyx Assassin – Vendetta1
- Nyx Assassin – Burrow
- Spectre – Spectral Dagger
- Spectre – Haunt Illusion
- Spectre – Shadow Step Illusion
- Terrorblade – Reflection Illusion
- Wraith King – Wraith Delay2a
- 1 Requires talent.
- 2a Requires Aghanim's Scepter.
- 2b Requires Aghanim's Shard.
Flying Movement[]
Flying movement is similar to unobstructed movement, with only very small differences, one being that flying units hover a certain distance above the ground with unobstructed vision and that even fewer abilities block flying movement.
When a unit turns to Flying Movement, although its hitbox and model ascend above the z-axis, both its collision size and bound radius are still on the ground. The following abilities provide Flying Movement while active:
- 1 Requires talent.
- 2a Requires Aghanim's Scepter.
- 2b Requires Aghanim's Shard.
Bound Radius[]
The Bound Radius determines the absolute coordinates of a unit in the game and acts as a pseudo-buffer for certain ability types' cast range values and attack range-related values. A unit's bound radius can be shown with dota_unit_show_bounding_radius 1
with console enabled.
Bound radius also affects the size of an area of effect, if an ability is cast as a ground-targeted ability, the affected target's bound size is also considered as a buffer range for ability, therefore increasing the ability's maximum area of effect range. However, if an ability is cast centered on the caster (with ↓↓ Double-tapping), the caster's bound radius value is ignored and no buffer range is added.
Mechanics | Affected Aspect / Definition | Ability Examples |
---|---|---|
Attack Range |
|
|
Cast Range (Unit-targeted Abilities) |
|
Laguna Blade |
Area-of-Effect Abilities |
|
Song of the Siren |
Equations[]
For normal attacks:
Actual Attack Range = Total Attack Range + Attacker Bound Radius + Target Bound Radius
For most melee heroes, the attack buffer range is defined as:
Total Melee Buffer Range = Unit Total Attack Range + Attacker Bound Radius + Target Bound Radius + 350
For abilities:
MAX Cast Range = Total Ability Cast Range + Target Bound Radius
MAX Effect Radius = Total Ability Effect Radius + Target Bound Radius
- Example 1a
- Maximum Distance for Attackable Range
- A Tower (Tier 1) is attacking Marci. Without other attack range-increasing sources, what is the maximum distance a normal attack would hit between the attacker and the unit being attacked?
- Tower (Tier 1) attack range: 700
- Tower (Tier 1) bound radius: 144
- Marci bound radius: 24
- Maximum attack range against Marci
- = 700 + 144 + 24
- = 868
- The Tower (Tier 1) has a 868 maximum attack range against Marci. Since the Tower cannot move, the 250 attack range buffer does not apply in this case.
- Example 1b
- With Attack Buffer Range
- Muerta is attacking Marci. Without other attack range-increasing sources, what is the maximum distance a normal attack would hit between the attacker and the unit being attacked?
- Muerta attack range: Lua error in Module:Show at line 24: attempt to index field '?' (a nil value).
- Muerta bound radius: Lua error in Module:Show at line 24: attempt to index field '?' (a nil value).
- Marci bound radius: 24
- Motion buffer distance: 250
- Maximum attack range against Marci
- = Lua error in Module:Show at line 24: attempt to index field '?' (a nil value). + 24 + Lua error in Module:Show at line 24: attempt to index field '?' (a nil value).
- = Expression error: Unexpected < operator.
- Muerta has a Expression error: Unexpected < operator. maximum attack range against Marci, and her attack cancels when Marci is beyond Expression error: Unexpected < operator. distance from her.
- Therefore, units with a smaller bound radius will have a lesser actual attack range value against them.
- Example 2
- An Ability's Maximum Effect Radius Between Two Casters
- What is the maximum area of effect range for Naga Siren's Song of the Siren affecting Rubick?
- If Rubick acquires Song of the Siren via Spell Steal, what is the maximum area of effect range for Rubick's Song of the Siren affecting Naga Siren?
- Song of the Siren max radius: 1400
- Rubick bound radius: Lua error in Module:Show at line 24: attempt to index field '?' (a nil value).
- Naga Siren bound radius: Lua error in Module:Show at line 24: attempt to index field '?' (a nil value).
- Maximum effect radius against Rubick:
- = 1400 + Lua error in Module:Show at line 24: attempt to index field '?' (a nil value).
- = Expression error: Unexpected < operator.
- Maximum effect radius against Naga Siren:
- = 1400 + Lua error in Module:Show at line 24: attempt to index field '?' (a nil value).
- = Expression error: Unexpected < operator.
- Therefore, Naga Siren's Song of the Siren has a greater area of effect of Expression error: Unexpected < operator. compared to Rubick's.
- Assuming both Rubick and Naga Siren are at ±1400 distance apart, an acquired Song of the Siren via Spell Steal might not affect Naga Siren if she is not within the actual effect radius since Naga Siren has a smaller bound radius as shown in the diagram on the right.
Selection Box[]
The selection box (or hitbox) is the range size of a unit being clickable, or when ⇱⇲ Drag is used to select units.
Most units have a minimum of two selection boxes, one exterior big cuboid, and at least one cuboid on the inside. For buildings, the cuboid inside might be larger than the exterior cuboid. Clicking outside the unit's selection box will not select the unit.
The selection box is bound to the unit's model and its values can be found using Workshop Tools. The selection boxes' size also scales with the current unit's model size. A unit's selection boxes can be shown with dota_unit_show_selection_boxes 1
with console enabled.
Certain cosmetic items change the value of the selection boxes due to having a different model as follows:
- Acolyte of the Lost Arts of Invoker's.
- Custom Observer and Sentry Wards.
Has the following priority when the selection boxes of multiple units overlap:
- The internal cuboid(s) ➤ The external cuboid ➤ The unit closest to the player's camera.
Selection Boxes Left Click |
Mechanics |
---|---|
Exterior Cube |
|
Internal Cube |
|
Hollow Ring |
|
Unselectable[]
Unselectability makes the unit not selectable, and selectable only in a few cases. Most abilities/items treat unselectable units as if they were invisible, except in a few cases. Some sources of unselectability may remove a unit's selection box, grant attack immunity, and may prevent allies or enemies or both from targeting them.
Although Hide sources also cause the unit to be unselectable and non-targetable, they are considered a different mechanic.
Model Size[]
A unit's Model Size is stored as a fixed scale value in npc_abilities.txt
or npc_units.txt
. Model Size can be shown with both ent_text
and debug_overlay_fullposition 1
with console enabled.
Model Size shown in ent_text
is equal to 1.12 * Model Scale
in either npc_abilities.txt
or npc_units.txt
.
It has no correlation with a unit's collision size or bound radius. However, increasing the model size increases the size of a unit's selection boxes.
Also, a unit's model animations do not determine the unit's current facing direction, certain ability interactions with the current unit's model may not correctly represent the current facing direction of the unit.
In most cases, ability animations with special model animations do not change the unit's facing direction. This includes all Taunt (Equipment) and the following abilities:
- 1 Requires talent.
- 2a Requires Aghanim's Scepter.
- 2b Requires Aghanim's Shard.
Different Model[]
The following sources directly change or replace the unit's current model. Certain abilities increase the model size as an effect as well, with more details can be found on their respective ability notes.
- Alchemist – Chemical Rage
- Dragon Knight – Elder Dragon Form
- Lone Druid – True Form
- Lycan – Wolf Bite
- Lycan – Shapeshift
- Muerta – Pierce the Veil
- Morphling – Morph
- Morphling – Morph Replicate
- Terrorblade – Metamorphosis
- Terrorblade – Terror Wave
- Troll Warlord – Berserker's Rage
- Undying – Flesh Golem
- Dazzle – Poison Touch2b
- Lion – Hex
- Pig Pole – Pig, Out!
- Scythe of Vyse – Hex
- Shadow Shaman – Hex
- Morphling – Morph
- Monkey King – Mischief
- Tiny – Grow
- 1 Requires talent.
- 2a Requires Aghanim's Scepter.
- 2b Requires Aghanim's Shard.
Percentage-Based Changes[]
All percentage-based model scale sources stack independently and additively of each other.
Total Model Size = Base Scale × (1 + Percentage-Based Scale i)
- Example
- Axe currently has a model scale of 1.12. What is his current model scale upon activating Avatar?
- Avatar model scale increase: 30%
- 1.12 × (1 + 0.3)
- = 1.456
Percentage Bonuses[]
- Black King Bar – Avatar
- Giant's Ring – Giant's Foot
- Bristleback – Warpath
- Huskar – Berserker's Blood
- Dragon Knight – Black Dragon Form2a
- Muerta – Pierce the Veil
- Ogre Magi – Bloodlust
- Ursa – Earthshock2b
- Ursa – Enrage
- Tinker – Laser2a
- Lone Druid – True Form
- Undying – Decay
- Undying – Flesh Golem
- Terrorblade – Metamorphosis
- Terrorblade – Terror Wave
- Wraith King – Wraith Delay2a
- 1 Requires talent.
- 2a Requires Aghanim's Scepter.
- 2b Requires Aghanim's Shard.
Edge Cases[]
In some edge cases, the unit's model size does affect gameplay and has some unique interactions between units and abilities.
Since a unit's model determines the entity attachments of projectiles, model size may indirectly affect attack animations and certain trajectories for projectiles. This may affect the following things:
- The projectile of Cripple starts from the front end of the hero's weapon. The larger the hero model, the closer the starting point of the projectile is to the target. Hence, the projectile will reach the target in a slightly shorter time.
- As shown in the right attachment, with Queen of Pain's original model scale, all attack projectiles are blocked by Arena Of Blood.
- After casting Avatar and increasing its model scale, the front edge of her weapon is considered inside the Arena Of Blood on certain attack animations, making some of her attack bypassing the Arena of Blood, and therefore damaging Mars.
- The same also applies to Outworld Destroyer, who has certain attack animations releasing projectiles from the tip of the weapon.
- Razor with Voidstorm Asylum equipped may attack targets near the Arena Of Blood within 150 range since the cosmetic uses a different attack animation in certain attack range.
Recent Changes[]
<div> <div class="updatetablehead"> <div id="version">Version</div><div id="description">Description</div> </div> <div class="updatetablebody">
- CHANGEDMeepo hull type from
DOTA_HULL_SIZE_HERO
toDOTA_HULL_SIZE_HERO_SMALL
.- Reduced collision size from 27 to 18.
- Reduced bound radius from 24 to 8.
- UCHANGEDWraith King Skeleton hull type from
DOTA_HULL_SIZE_HERO
toDOTA_HULL_SIZE_SMALL
.- Reduced collision size from 27 to 18.
- Reduced bound radius from 24 to 8.
- CHANGEDall melee heroes' from
DOTA_HULL_SIZE_HERO_SMALL
toDOTA_HULL_SIZE_HERO
. [?]- Reduced collision size from 18 to 27.
- Increased bound radius from 12 to 24.
</div> </div>