Mount props to animated Characters
Use attach(child, child_point, parent, parent_point, offset) to mount an Actor or Entity to a supported joint. The optional offset is a three-number basket in the parent joint's local coordinates.
Set the child's local rotation before calling attach().
const hero = proj.find("Hero")
const sword = proj.find("Sword")
if hero != nil && sword != nil {
sword.rotation = [0, 0, -1.5707963]
attach(sword, "Origin", hero, "RightHand", [0, 0, 0])
}
The engine follows the animated joint. No extra sixth rotation argument or per-frame script update is needed. Use detach(child) to release the object.
Next: Global functions · Character animations
Spatial attachments [BETA]
Some newer runtime-created Light, Audio, and Particle Emitter Cells can be mounted to Actors. Those spatial Cells follow position through a separate attachment path, not the full Actor/Entity local rotation behavior.