Node: Attachment Volumes
Attachment Volumes are used by StarCraft II to attach items or effects to a general 3D area, as opposed to an exact point in space. Attachment Volumes are special types of Attachment Points, but the most common, by far, is Vol_Target. It is important to have Vol_Targets for new units and buildings to look correct when being attacked.
Volume Targets
-
There can be as many as appropriate per model. It is marked by the name of the node starting with Vol_. Common examples of names are, Vol_Target, Vol_Target 01, Vol_Shield, etc. Numbers cannot be skipped.
-
Because Attachment Volumes are special cases of Attachment Points, two cannot share a name. For example, having Ref_Target and Vol_Target in the same file will cause errors.
-
The surfaces of the Volumes should match, as closely as possible, the surface of the model. It is supposed to be a cheap approximation of the model.
-
Conventionally, Vol_Shield is used for Protoss Shields in the same way Vol_Target is for general impact. There is usually only one per model, and it is slightly larger than other Volumes.
-
When multiple volumes of the same type are in a model, the selection process is roughly: A volume with a pivot close to the originator of the attachment request will be chosen. Draw a line from the originator to some point on the surface of the selected volume. The attachment will occur on the closest intersection point of all surfaces of the current type.
-
Vol_Targets are often just slightly scaled down HitTestFuzzy nodes. This usually works quite well.
-
Must be a Standard primitive: Sphere, Box, or Capsule.
-
Do not collapse the primitive shapes or convert to any other shape. The exporter reads their radius, length, width, and height fields.
-
Spheres are best for performance speed. Prefer spheres if possible. Capsules are next best, and boxes are the worst.
-
Unlike Hit Test, parts of shapes below ground are considered. If the shape is below ground, particle effects that spawn off it may not be visible.
-
Shapes can be rescaled, but only along local axes. Shapes like cylinders can be achieved by increasing the height of a capsule, then scaling it down along a single axis.
-
Negative Scale is not allowed.
-
Shapes can, and should, be linked to animated parts of the model where applicable.
-
Translate, rotate, and scale can be animated to match a model's animation.
-
Invisible shapes are turned off. Visibility can be animated.