Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

Skeleton3D

Inherits: Node3D < Node < Object

A node containing a bone hierarchy, used to create a 3D skeletal animation.

Description

Skeleton3D provides an interface for managing a hierarchy of 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 bone pose. Bone rest defines the initial transform of the bone pose.

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

Tutorials

Properties

bool

animate_physical_bones

true

float

motion_scale

1.0

bool

show_rest_only

false

Methods

void

add_bone ( String name )

void

clear_bones ( )

void

clear_bones_global_pose_override ( )

Skin

create_skin_from_rest_transforms ( )

int

find_bone ( String name ) const

void

force_update_all_bone_transforms ( )

void

force_update_bone_child_transform ( int bone_idx )

PackedInt32Array

get_bone_children ( int bone_idx ) const

int

get_bone_count ( ) const

Transform3D

get_bone_global_pose ( int bone_idx ) const

Transform3D

get_bone_global_pose_no_override ( int bone_idx ) const

Transform3D

get_bone_global_pose_override ( int bone_idx ) const

Transform3D

get_bone_global_rest ( int bone_idx ) const

String

get_bone_name ( int bone_idx ) const

int

get_bone_parent ( int bone_idx ) const

Transform3D

get_bone_pose ( int bone_idx ) const

Vector3

get_bone_pose_position ( int bone_idx ) const

Quaternion

get_bone_pose_rotation ( int bone_idx ) const

Vector3

get_bone_pose_scale ( int bone_idx ) const

Transform3D

get_bone_rest ( int bone_idx ) const

PackedInt32Array

get_parentless_bones ( ) const

int

get_version ( ) const

bool

is_bone_enabled ( 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 ( StringName[] bones=[] )

void

physical_bones_stop_simulation ( )

SkinReference

register_skin ( Skin skin )

void

reset_bone_pose ( int bone_idx )

void

reset_bone_poses ( )

void

set_bone_enabled ( int bone_idx, bool enabled=true )

void

set_bone_global_pose_override ( int bone_idx, Transform3D pose, float amount, bool persistent=false )

void

set_bone_name ( int bone_idx, String name )

void

set_bone_parent ( int bone_idx, int parent_idx )

void

set_bone_pose_position ( int bone_idx, Vector3 position )

void

set_bone_pose_rotation ( int bone_idx, Quaternion rotation )

void

set_bone_pose_scale ( int bone_idx, Vector3 scale )

void

set_bone_rest ( int bone_idx, Transform3D rest )

void

unparent_bone_and_rest ( int bone_idx )


Signals

bone_enabled_changed ( int bone_idx )

Emitted when the bone at bone_idx is toggled with set_bone_enabled. Use is_bone_enabled to check the new value.


bone_pose_changed ( int bone_idx )

This signal is emitted when one of the bones in the Skeleton3D node have changed their pose. This is used to inform nodes that rely on bone positions that one of the bones in the Skeleton3D have changed their transform/pose.


pose_updated ( )

Emitted when the pose is updated, after NOTIFICATION_UPDATE_SKELETON is received.


show_rest_only_changed ( )

Emitted when the value of show_rest_only changes.


Constants

NOTIFICATION_UPDATE_SKELETON = 50

Notification received when this skeleton's pose needs to be updated.

This notification is received before the related pose_updated signal.


Property Descriptions

bool animate_physical_bones = true

  • void set_animate_physical_bones ( bool value )

  • bool get_animate_physical_bones ( )

There is currently no description for this property. Please help us by