Skip to content

Search

Documentation

bone2d component

Makes the node a 2D bone. rest_position and rest_rotation are the pose a rig returns to; length and angle draw its gizmo.

Pe această pagină

2d · animation · 4 properties · 2D

Makes the node a 2D bone. rest_position and rest_rotation are the pose a rig returns to; length and angle draw its gizmo.

In a scene, bone2d is the node key that applies it. A script reaches each property below as a field on node.bone2d: reading one asks the running component, and assigning one leaves the rest alone. The whole table is node.bone2d.get() and node.bone2d.set(table).

Properties

property type default description
angle float 0 Gizmo direction of a tip bone, in radians; ignored while a child bone exists
length float 0 Gizmo length of a tip bone; 0 draws to the first child bone At least 0.
rest_position vec2 [0,0] Local rest translation
rest_rotation float 0 Local rest rotation about z, in radians