User:Irismus/SandboxPage2

Unit Size is a mechanic that can describe a unit's internal size.

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.

Collision Size
Collision Size is a unit's internal size that cannot be passed through by other units. This allows units to block each other with their bodies. Most heroes have the same collision size, regardless of their graphical model. Phased status allows units to ignore collision size.

Generally, Collision size means the smallest possible distance between two units without being phased. Therefore, the smallest possible distance between two units is equal to the sum of the two unit Collision size.

The existence of the Collision Size makes the unit be blocked by the target during pathfinding. The unit may walk bypass or stop when being blocked.

Collision Size can be shown by inputting dota_unit_show_collision_radius 1 in Console.

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 unobstructed movement (which includes flying movement as well) 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.

Pathing Blocker are generally not selectable. And most of them are driven by the npc_dota_thinker.

Especially, the smallest distance with Pathing Blocker entities are depended on the both Bounding Size instead of Collision Size.
 * For example, the smallest distance between a standard size hero and center is 48 not 54.

Defender's Gate is Pathing Blocker on the near the base. Other Pathing Blocker abilities are shown below.

Collision Size Priority
Units with Phased status can ignore other unit Collision Sizes, causing the two units to overlap.

When multiple units overlap, if the Phased status disappears when overlapping, the units with lower Collision Size priority will be squeezed away, and the units with higher Collision Size priority will stand still.

Collision Size Priority are shown below:


 * Units that cannot move always have the highest priority: such as most wards, buildings and Pathing Blocker sources.
 * Units that lose phase status first have lower priority.

If two heroes are in the same coordinates, the distance will be 58 after being squeezed away, regardless of the collision sizes of these heroes.

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.

Phased Movement
These abilities provide phased movement which allows moving through units:

1 Shadow Fiend becomes phased during the cast time of.

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:

Permanently Phased
The following units are permanently phased:

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 and that even less spells block flying movement.

When the a unit turns to Flying Movement, its Model Size and Selection Size will rise away from ground, but the Collision Size and Bounding Size are still on the ground.

The following abilities provides Flying Movement while active:

Bounding Size


Bounding Size determines the absolute coordinates of a unit in the game, and it limits the interaction range of this unit with other units or abilities.

Bounding Size affects the cast range of Target Unit abilities. The actual cast range will be increased by target's Bounding Size. Also, Bounding Size can affect the size of an area ability and aura, making the maximum area increase.

Attack range is not only depended by the target Bounding Size, attacker own Bounding Size can also affects the actual attack range.

Bounding Size can be shown by inputting dota_unit_show_bounding_radius 1 in Console.

The Bounding Size effects are shown below:




 * Example 1
 * What is the maximum cast range if casts  on ?


 * Cast Range values:
 * cast range:
 * Bounding Size values:




 * in this example has a maximum cast range of in this example.


 * Example 2
 * What is the maximum attack range if attacks on ?

A tower has a Bounding Size of  with a  attack range. have a collision size of, it has attack range against.


 * Example 3
 * What is the maximum area of effect range if casts  on ?


 * Area Range values:
 * radius:
 * Bounding Size values:




 * in this example has a maximum area of effect range of in this example.

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 calculate multiplicatively.

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.