Skeleton

Inherits: Spatial < Node < Object

Esqueleto de personajes y objetos animados.

Descripción

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.

Tutoriales

Métodos

void

add_bone ( String name )

void

bind_child_node_to_bone ( int bone_idx, Node node )

void

clear_bones ( )

void

clear_bones_global_pose_override ( )

int

find_bone ( String name ) const

int

get_bone_count ( ) const

Transform

get_bone_custom_pose ( int bone_idx ) const

Transform

get_bone_global_pose ( int bone_idx ) const

Transform

get_bone_global_pose_no_override ( int bone_idx ) const

String

get_bone_name ( int bone_idx ) const

int

get_bone_parent ( int bone_idx ) const

Transform

get_bone_pose ( int bone_idx ) const

Transform

get_bone_rest ( int bone_idx ) const

Array

get_bound_child_nodes_to_bone ( int bone_idx ) const

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 ( )

SkinReference

register_skin ( Skin skin )

void

set_bone_custom_pose ( int bone_idx, Transform custom_pose )

void

set_bone_disable_rest ( int bone_idx, bool disable )

void

set_bone_global_pose_override ( int bone_idx, Transform 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 ( int bone_idx, Transform pose )

void

set_bone_rest ( int bone_idx, Transform rest )

void

unbind_child_node_from_bone ( int bone_idx, Node node )

void

unparent_bone_and_rest ( int bone_idx )

Señales

  • skeleton_updated ( )

Constantes

  • NOTIFICATION_UPDATE_SKELETON = 50

Descripciones de Métodos

  • void add_bone ( String name )

Añade un hueso, con el nombre name. get_bone_count se convertirá en el índice óseo.


  • void bind_child_node_to_bone ( int bone_idx, Node node )

Pronto estara obsoleto.


  • void clear_bones ( )

Limpia todos los huesos de este esqueleto.


  • void clear_bones_global_pose_override ( )


Devuelve el índice óseo que coincide con name como su nombre.


  • int get_bone_count ( ) const

Devuelve la cantidad de huesos del esqueleto.


Devuelve la postura personalizada del hueso especificado. La postura personalizada se aplica sobre la postura de descanso.


Devuelve la transformación general del hueso especificado, con respecto al esqueleto. Siendo relativa al marco del esqueleto, esta no es la transformación "global" real del hueso.


  • Transform get_bone_global_pose_no_override ( int bone_idx ) const

Returns the overall transform of the specified bone, with respect to the skeleton, but without any global pose overrides. Being relative to the skeleton frame, this is not the actual "global" transform of the bone.


  • String get_bone_name ( int bone_idx ) const

Devuelve el nombre del hueso en el índice index.


  • int get_bone_parent ( int bone_idx ) const

Devuelve el índice de hueso que es el padre del hueso en bone_idx. Si es -1, entonces el hueso no tiene padre.

Nota: El hueso padre devuelto siempre será menor que bone_idx.


Devuelve la transformación de la postura del hueso especificado. La pose se aplica encima de la pose personalizada, que se aplica encima de la pose de descanso.


Devuelve la transformación de reposo para un hueso bone_idx.


  • Array get_bound_child_nodes_to_bone ( int bone_idx ) const

Pronto estara obsoleto.


  • 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_global_pose_override ( int bone_idx, Transform 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 )

Establece el índice óseo parent_idx como el padre del hueso en bone_idx. Si es -1, entonces el hueso no tiene padre.

Nota: parent_idx debe ser menor que bone_idx.


Sets the pose transform for bone bone_idx.


Establece la transformación del descanso para el hueso bone_idx.


  • void unbind_child_node_from_bone ( int bone_idx, Node node )

Pronto estara obsoleto.


  • void unparent_bone_and_rest ( int bone_idx )