User:Irismus/SandboxPage2

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.

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.

Both and 's Ancient uses the. Their exact collision size and bound radius can be found in.

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  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:

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 -distance away upon losing phased movement, regardless of the collision sizes. In the following table, and  have a collision size of  and  respectively. The illusions will spawn at different distances depending on the affected target's collision size as follows:


 * Example
 * casts  on an enemy  and . How far the Phantasm illusion will be spawned next to both of these enemy targets?


 * Collision Size:
 * Collision Size:
 * Collision Size:


 * Since both heroes' collision sizes are the same, the Phantasm illusion will spawn -distance away when does not have phased movement.
 * For the, the Phantasm illusion will spawn 87-distance away instead.

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:

The following units are permanently phased:

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:

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:

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  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), the caster's bound radius value is ignored and no buffer range is added.

Equations
For normal attacks:  Actual Attack Range = Total Attack Range + Attacker Bound Radius + Target Bound Radius 

For abilities: MAX Cast Range = Total Ability Cast Range + Target Bound Radius

MAX Effect Radius = Total Ability Effect Radius + Target Bound Radius

: Maximum Distance for Attackable Range
 * Example 1a
 * A is attacking . Without other attack range-increasing sources, what is the maximum distance a normal attack would hit between the attacker and the unit being attacked?


 * attack range:
 * bound radius:
 * bound radius:


 * Maximum attack range against


 * The has a  maximum attack range against . Since the Tower cannot move, the  attack range buffer does not apply in this case.


 * Example 1b
 * With Attack Buffer Range
 * is attacking . Without other attack range-increasing sources, what is the maximum distance a normal attack would hit between the attacker and the unit being attacked?


 * attack range:
 * bound radius:
 * bound radius:
 * Motion buffer distance:


 * Maximum attack range against


 * has a maximum attack range against, and her attack cancels when  is beyond  distance from her.
 * Therefore, units with a smaller bound radius will have a lesser actual attack range value against them.

: An Ability's Maximum Effect Radius Between Two Casters
 * Example 2
 * What is the maximum area of effect range for 's affecting ?
 * If acquires  via, what is the maximum area of effect range for Rubick's Song of the Siren affecting ?


 * max radius:
 * bound radius:
 * bound radius:


 * Maximum effect radius against :


 * Maximum effect radius against :


 * Therefore, Naga Siren's has a greater area of effect of  compared to 's.
 * Assuming both Rubick and Naga Siren are at ± distance apart, an acquired Song of the Siren via might not affect Naga Siren if she is not within the actual effect radius since Naga Siren has a smaller bound radius.

Selection Size
Selection Size is the range size of a unit selected by mouse.

Default Selection Size is determined by the respective model. The specific value can be found by using the Workshop Tools. Also Selection Size changes with the change of model size.

Most Selection Size consists of two parts. One is a big cube externally, and the other is at least one cube internally.

Selection Size can be shown by inputting dota_unit_show_selection_boxes 1 in Console.

The unit can be selected by clicking within the external cube or dragging to the internal cube. Generally, as the unit's model size changes, the unit's Selection Size will change accordingly.
 * Casting target Unit abilities also need to click the external cube for selecting.

The ring circle under the selected unit's foot can not represent Selection Size. The radius of this circle is a constant value written in the key-value files.

When the Selection Size of multiple units overlap, it will be judged by follows:
 * Internal frames have higher priority than external frames.
 * When the priority is the same, the unit closer to the player's camera will be selected first.

Few equipment can change the selection size because another model replaces the original model.

Some abilities and units have no Selection Size: All hidden units. Some hidden units are only selectable for controllers. Others are shown below.

Model Size
Model Size for each unit can be found in the key-value files.

Also, the model size scale of selected unit will be displayed in game by inputting debug_overlay_fullposition 1 and ent_text in Console.

Generally, each model have a specific scale by the model file.

Model size multiplier = Model Base Size * (1 + Multipliers)

Grow 1.0864/

Model Size is the size of unit model scale.

Model Size can be shown by inputting ent_hitbox in Console when the unit is selected.

Model Size can not determine the facing location of unit, which means that the model animation facing location may be not consistent with the actual facing location.

For example, some abilities (,, and  etc. ) and Taunt Equipment shows inconsistent facing location with the animation.

Selection Size is related to the Model Size, but Collision Size and Bounding Size have no association with Model Size. When Model Size changes, Selection Size will change additionally, but Collision Size and Bounding Size will be constant.

Some abilities (eg: Transformation Abilities, all sources hex, and ) can replace Model directly. But the Model Size will not necessarily change.

Some abilities can change the Model Size of the unit in proportion.

Effect of Model Size
Generally, Model Size does not have any substantial impact. But in few extremely unique cases, Model Size can generate some interactions with units or abilities.

Model can determine the entity attachments of units. Entity attachments can affect the animation and some interactions with projectiles.

For example, always emits projectile from the front end of the hero's weapon. When the hero's model is larger, the starting point of the projectile will be closer to the target, so the projectile will reach the target in a shorter time.

As shown in the right attachment, has a small original model, all the attack projectile are blocked by the, but after casting , the front edge of the weapon may enter the scope of , making attack successful at that time.