Bone2D
Joint used with Skeleton2D to control and animate other nodes.
Use a hierarchy of bound to a Skeleton2D to control, and animate other nodes.
You can use Bone2D
and nodes to animate 2D meshes created with the Polygon 2D UV editor.
Each bone has a rest transform that you can reset to with . These rest poses are relative to the bone’s parent.
If in the editor, you can set the rest pose of an entire skeleton using a menu option, from the code, you need to iterate over the bones to set their individual rest poses.
Length of the bone’s representation drawn in the editor’s viewport in pixels.
- rest
Rest transform of the bone. You can reset the node’s transforms to this value using apply_rest.
- void apply_rest ( )
Stores the node’s current transforms in rest.
- get_skeleton_rest ( ) const
Returns the node’s rest Transform2D
if it doesn’t have a parent, or its rest pose relative to its parent.