Bone2D
Category: Core
Joint used with to control and animate other nodes.
Properties
Description
Use a hierarchy of bound to a Skeleton2D to control, and animate other nodes.
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.
- float default_length
Length of the bone’s representation drawn in the editor’s viewport in pixels.
Method Descriptions
- void apply_rest ( )
Stores the node’s current transforms in .
- int get_index_in_skeleton ( ) const
Returns the node’s index as part of the entire skeleton. See .
- Transform2D get_skeleton_rest ( ) const
Returns the node’s if it doesn’t have a parent, or its rest pose relative to its parent.