Inherits: Spatial < Node < Object

Skeleton for characters and animated objects.


Skeleton provides a hierarchical interface for managing bones, including pose, rest and animation (see Animation). It can also use ragdoll physics.

The overall transform of a bone with respect to the skeleton is determined by the following hierarchical order: rest pose, custom pose and pose.

Note that “global pose” below refers to the overall transform of the bone with respect to skeleton, so it not the actual global/world transform of the bone.


voidadd_bone ( String name )
voidbind_child_node_to_bone ( int bone_idx, Node node )
voidclear_bones ( )
intfind_bone ( String name ) const
intget_bone_count ( ) const
Transformget_bone_custom_pose ( int bone_idx ) const
Transformget_bone_global_pose ( int bone_idx ) const
Stringget_bone_name ( int bone_idx ) const
intget_bone_parent ( int bone_idx ) const
Transformget_bone_pose ( int bone_idx ) const
Transformget_bone_rest ( int bone_idx ) const
Arrayget_bound_child_nodes_to_bone ( int bone_idx ) const
boolis_bone_rest_disabled ( int bone_idx ) const
voidlocalize_rests ( )
voidphysical_bones_add_collision_exception ( RID exception )
voidphysical_bones_remove_collision_exception ( RID exception )
voidphysical_bones_start_simulation ( Array bones=[ ] )
voidphysical_bones_stop_simulation ( )
SkinReferenceregister_skin ( Skin skin )
voidset_bone_custom_pose ( int bone_idx, Transform custom_pose )
voidset_bone_disable_rest ( int bone_idx, bool disable )
voidset_bone_global_pose_override ( int bone_idx, Transform pose, float amount, bool persistent=false )
voidset_bone_parent ( int bone_idx, int parent_idx )
voidset_bone_pose ( int bone_idx, Transform pose )
voidset_bone_rest ( int bone_idx, Transform rest )
voidunbind_child_node_from_bone ( int bone_idx, Node node )
voidunparent_bone_and_rest ( int bone_idx )



Method Descriptions

Adds a bone, with name name. get_bone_count will become the bone index.

  • void bind_child_node_to_bone ( int bone_idx, Node node )

Deprecated soon.

  • void clear_bones ( )

Clear all the bones in this skeleton.

Returns the bone index that matches name as its name.

  • int get_bone_count ( ) const

Returns the amount of bones in the skeleton.

Returns the custom pose of the specified bone. Custom pose is applied on top of the rest pose.

Returns the overall transform of the specified bone, with respect to the skeleton. Being relative to the skeleton frame, this is not the actual “global” transform of the bone.

Returns the name of the bone at index index.

  • int get_bone_parent ( int bone_idx ) const

Returns the bone index which is the parent of the bone at bone_idx. If -1, then bone has no parent.

Note: The parent bone returned will always be less than bone_idx.

Returns the pose transform of the specified bone. Pose is applied on top of the custom pose, which is applied on top the rest pose.

Returns the rest transform for a bone bone_idx.

  • Array get_bound_child_nodes_to_bone ( int bone_idx ) const

Deprecated soon.

  • bool is_bone_rest_disabled ( int bone_idx ) const

  • void localize_rests ( )

  • void physical_bones_add_collision_exception ( RID exception )

  • void physical_bones_remove_collision_exception ( RID exception )

  • void physical_bones_start_simulation ( Array bones=[ ] )

  • void physical_bones_stop_simulation ( )

  • void set_bone_custom_pose ( int bone_idx, Transform custom_pose )

  • void set_bone_disable_rest ( int bone_idx, bool disable )

  • void set_bone_parent ( int bone_idx, int parent_idx )

Sets the bone index parent_idx as the parent of the bone at bone_idx. If -1, then bone has no parent.

Note: parent_idx must be less than bone_idx.

Returns the pose transform for bone bone_idx.

Sets the rest transform for bone bone_idx.

  • void unbind_child_node_from_bone ( int bone_idx, Node node )

Deprecated soon.

  • void unparent_bone_and_rest ( int bone_idx )

Doc ID missing

Disclaimer: This page has been automaticaly and directly extracted from the official Godot Docs website, the 1970-01-01 at 00:00:00. It’s the English Stable version because it’s what most Godot users should use. The Copyright owners are Juan Linietsky, Ariel Manzur and the Godot community. CC-BY 3.0. Thanks for your patience and generosity.