Bone Attachment
Under a Skeleton: follows one of its bones - put a weapon, a light or particles under it.
Type: BoneAttachmentNode · Category: Animation & Effects · Also found as: bone attachment, attach to bone
Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
bone |
string | "" |
The parent skeleton’s bone this node follows (its children ride along: a weapon in the hand). |
followRotation |
boolean | true |
Turn with the bone. |
followScale |
boolean | false |
Scale with the bone. |
Plus the common properties every node has.
Lua methods
Section titled “Lua methods”Call them on the node (self.node in its script, or self.node:get_node("path")). Every node also has the Node methods.
BoneAttachmentNode:get_property(path)
Section titled “BoneAttachmentNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("bone")pathBoneAttachmentNodeProperty|string
Returns any
BoneAttachmentNode:set_property(path, value, y)
Section titled “BoneAttachmentNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("bone", "text")pathBoneAttachmentNodeProperty|stringvalueanyy?number
In a scene file
Section titled “In a scene file”{ "type": "BoneAttachmentNode", "name": "BoneAttachment", "position": [ 0, 0 ], "properties": { "bone": "", "followRotation": true, "followScale": false }}