The offset is applied to the object center unless a memory point is provided, in which case the offset will be applied to the memory point position.
If no offset is specified, the current offset between the two objects will be used.
Note
All direction commands, such as setDir, setVectorDirAndUp, etc. for an attached object should be used relative to the reference object's direction (i.e. in model space), e.g _attachedObj setDir 0 will make it face the same direction as the reference object, 90 face to the right, 180 face to the back, etc.
Attached triggers only follow the direction of the object to which they are attached, not pitch or roll.
Use _attachedObj setPosWorld getPosWorld _attachedObjaftersetDir to synchronise direction properly over the network (see setDir's page for its MP behaviour).
You would expect the suitcase to jump to the pivot point of the table, and stick to it.
Instead, the suitcase will freeze in it is original position. Even if the table is moved, the suitcase will be unaffected: it will not follow the table, it will not even respond to actions it reacted to prior to being attached: pushing, being shot at, etc.. It's just an object frozen in space. In MP it is even weirder, the suitcase would turn invisible.
Dodgy objects when it comes to attaching things to them: most in Objects (small), Objects (signs), all of Objects (helpers) categories, etc.
Pixinger
If you attach an explosive charge to an object (e.g. ammobox), the charge will not detonate when you simply set the damage to 1. You must detach it before.
Attaching an object does not update the accessibility of a place for the AI. The command should not be used for positioning large static objects - the AI will simply walk through such objects.
Demellion
Using attachTo with objects that have ragdoll physics (such as ammo boxes, containers, etc.) may cause unexpected behaviour.
When you do so, if the attached object intersect origin object, origin object may gain some enormous collision properties even if the collision model for the attached object is not present localy to origin object, until detached.
Vehicles may start flipping with no mass calculation (ie tank might fly), player object might gain infinite Z-vector velocity on any interaction with terrain relief and other objects.
R3vo
When attaching a unit which is playing an animation to a static object, the animation becomes laggy. Presumably because the update frequency of the static object is used.
Leopard20
To find all selection names of vehicle turrets for attachTo, you can use this script: